Fix uninitialized variable
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Feb 2011 20:57:25 +0000 (12:57 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Feb 2011 20:57:25 +0000 (12:57 -0800)
It was possible for rc to be unitialized in the parse_options()
function which triggered a compiler warning.  Ensure rc is always
initialized.

cmd/zfs/zfs_main.c

index 86f0d5c..f21c36b 100644 (file)
@@ -3902,7 +3902,7 @@ parse_option(char *mntopt, unsigned long *mntflags, int sloppy)
 {
        const option_map_t *opt;
        char *ptr, *name, *value = NULL;
-       int rc;
+       int rc = 0;
 
        name = strdup(mntopt);
        if (name == NULL)