Whamcloud - gitweb
[COVERITY] Fix coverity warning in debugfs
authorTheodore Ts'o <tytso@mit.edu>
Thu, 29 Mar 2007 04:26:10 +0000 (00:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 29 Mar 2007 04:26:10 +0000 (00:26 -0400)
This is a no-op since long_opt isn't currently being used; the -l option
to htree_dump is currently unwired to anything at the moment.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Coverity ID: 47: Used before assigned

debugfs/ChangeLog
debugfs/htree.c

index ea0f196..c49aa63 100644 (file)
@@ -1,3 +1,9 @@
+2007-03-29  Theodore Tso  <tytso@mit.edu>
+
+       * htree.c (do_htree_dump): Fix coverity use before assignment
+               warning.  (long_opt isn't being used for anything right
+               now, so this is a no-op)
+
 2007-03-23  Theodore Tso  <tytso@mit.edu>
 
        * logdump.c (do_logdump): Fix file handle leak if logdump fails
index bd1fd51..0f7e9c1 100644 (file)
@@ -185,7 +185,7 @@ void do_htree_dump(int argc, char *argv[])
        ext2_ino_t      ino;
        struct ext2_inode inode;
        int             c;
-       int             long_opt;
+       int             long_opt = 0;
        char            *buf = NULL;
        struct          ext2_dx_root_info  *rootnode;
        struct          ext2_dx_entry *ent;