]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tune2fs.c (parse_time): Fix minor buglet; the parse_time routine
authorTheodore Ts'o <tytso@mit.edu>
Wed, 22 Dec 2004 01:40:08 +0000 (20:40 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 22 Dec 2004 01:40:08 +0000 (20:40 -0500)
should use the passed-in argument, not optarg, even though
the two are the same in the case of the current caller of
said function.  (i.e., no user-visible problems were caused
by this, even though the code was wrong).

misc/ChangeLog
misc/tune2fs.c

index e0caf5f9cfdb69291b0797c26a0e26907dc7e2be..979752965f98b05307128667c74167980069fdf3 100644 (file)
@@ -1,3 +1,10 @@
+2004-12-21  Theodore Ts'o  <tytso@mit.edu>
+
+       * tune2fs.c (parse_time): Fix minor buglet; the parse_time routine
+               should use the passed-in argument, not optarg, even though
+               the two are the same in the case of the current caller of
+               said function.
+
 2004-12-15  Theodore Ts'o  <tytso@mit.edu>
 
        * mke2fs.c: Applied resize inode patch from Andreas Dilger to add
index 2a8ac02c04c4cedefcb5c1a59cf05ce998cfbd19..c300f27c550a673ec4e9e3377f753243acfbcf5b 100644 (file)
@@ -476,9 +476,9 @@ static time_t parse_time(char *str)
        }
        memset(&ts, 0, sizeof(ts));
 #ifdef HAVE_STRPTIME
-       strptime(optarg, "%Y%m%d%H%M%S", &ts);
+       strptime(str, "%Y%m%d%H%M%S", &ts);
 #else
-       sscanf(optarg, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon,
+       sscanf(str, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon,
               &ts.tm_mday, &ts.tm_hour, &ts.tm_min, &ts.tm_sec);
        ts.tm_year -= 1900;
        ts.tm_mon -= 1;