From: Karel Zak Date: Tue, 3 Mar 2009 14:34:10 +0000 (+0100) Subject: mount: fix gcc warning (variable used uninitialized) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=457470060f31cc2cc7c6c03015909927af86507c;p=util-linux mount: fix gcc warning (variable used uninitialized) fstab.c: In function ‘getfs_by_spec’: fstab.c:400 warning: ‘name’ may be used uninitialized in this function fstab.c:402 warning: ‘value’ may be used uninitialized in this function Signed-off-by: Karel Zak --- diff --git a/mount/fstab.c b/mount/fstab.c index 57954598..c238fa2d 100644 --- a/mount/fstab.c +++ b/mount/fstab.c @@ -388,7 +388,7 @@ getfs_by_dir (const char *dir) { /* Find the device SPEC in fstab. */ struct mntentchn * getfs_by_spec (const char *spec) { - char *name, *value, *cspec; + char *name = NULL, *value = NULL, *cspec; struct mntentchn *mc = NULL; if (!spec)