diff options
author | James Youngman <jay@gnu.org> | 2011-06-03 10:34:38 +0100 |
---|---|---|
committer | James Youngman <jay@gnu.org> | 2011-06-04 12:57:45 +0100 |
commit | ea8d625522c11d69b55aff54ff742ff65d79f9bd (patch) | |
tree | 8c938bd902dcf5b83d5e211b85584fcc71fd3bcb | |
parent | 97218037b0cc7062599e47e54387f15ba720f7fa (diff) | |
download | findutils-ea8d625522c11d69b55aff54ff742ff65d79f9bd.tar.gz |
Warn about lack of birth time information only when it's true.
* find/pred.c (pred_newerXY): Issue a warning about the inability
to get the birth time of a file, only if we actually failed to
obtain the birth time of the file. This is a bugfix; there was a
misplaced semicolon after an if condition, so the immediately
succeeding block qould be executed unconditionally.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | find/pred.c | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,12 @@ 2011-06-03 James Youngman <jay@gnu.org> + Warn about lack of birth time information only when it's true. + * find/pred.c (pred_newerXY): Issue a warning about the inability + to get the birth time of a file, only if we actually failed to + obtain the birth time of the file. This is a bugfix; there was a + misplaced semicolon after an if condition, so the immediately + succeeding block qould be executed unconditionally. + Compiler warning fixes in find/pred.c. * find/pred.c (mode_to_filetype): return const char*. (impl_pred_exec): Make target and prefix variables const. diff --git a/find/pred.c b/find/pred.c index 0c68df67..9a6a9487 100644 --- a/find/pred.c +++ b/find/pred.c @@ -1502,7 +1502,7 @@ pred_newerXY (const char *pathname, struct stat *stat_buf, struct predicate *pre case XVAL_BIRTHTIME: ts = get_stat_birthtime (stat_buf); collected = true; - if (ts.tv_nsec < 0); + if (ts.tv_nsec < 0) { /* XXX: Cannot determine birth time. Warn once. */ error (0, 0, _("WARNING: cannot determine birth time of file %s"), |