aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-02-01 21:47:51 -0800
committerRob Landley <rob@landley.net>2020-02-02 01:54:22 -0600
commit75d1bf9addbd8bb7ca64d773883f6feef54b2d8c (patch)
treed65c73ebc5fb552f9780bd2f396a071ecbe53315
parentda60fb13dc52c7ab337157953785e1bd1bb95460 (diff)
downloadtoybox-75d1bf9addbd8bb7ca64d773883f6feef54b2d8c.tar.gz
mount.c: fix an error check.
Found by GCC 9: toys/lsb/mount.c:188:22: warning: '%s' directive argument is null [-Wformat-overflow=]
-rw-r--r--toys/lsb/mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/lsb/mount.c b/toys/lsb/mount.c
index 5bf300db..6b1dfa46 100644
--- a/toys/lsb/mount.c
+++ b/toys/lsb/mount.c
@@ -185,7 +185,7 @@ static void mount_filesystem(char *dev, char *dir, char *type,
if (strstart(&dev, "UUID=")) {
char *s = tortoise(0, (char *[]){"blkid", "-U", dev, 0});
- if (!dev) return error_msg("No uuid %s", dev);
+ if (!s) return error_msg("No uuid %s", dev);
dev = s;
}