diff options
author | Roy Marples <roy@marples.name> | 2009-02-12 10:43:30 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-02-12 10:43:30 +0000 |
commit | 6cc68e21cf83bfac927531ab989dc7381ab6797f (patch) | |
tree | 34fd37857fae87d2f53cb3cad9f52fc540581cad /src | |
parent | 9f3cf59818c9801e6e66189529bdff86fc391391 (diff) |
Fix return value for tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/librc/librc-depend.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c index 0af7391d..45c3dd02 100644 --- a/src/librc/librc-depend.c +++ b/src/librc/librc-depend.c @@ -565,27 +565,31 @@ mtime_check(const char *source, const char *target, bool newer, return true; if (newer) { - if (mtime < buf.st_mtime) + if (mtime < buf.st_mtime) { + if (rel == NULL) + return false; retval = false; + } if (rel != NULL) { if (*rel < buf.st_mtime) { if (file) strlcpy(file, target, PATH_MAX); *rel = buf.st_mtime; } - } else - return retval; + } } else { - if (mtime > buf.st_mtime) + if (mtime > buf.st_mtime) { + if (rel == NULL) + return false; retval = false; + } if (rel != NULL) { if (*rel > buf.st_mtime) { if (file) strlcpy(file, target, PATH_MAX); *rel = buf.st_mtime; } - } else - return retval; + } } /* If not a dir then reset errno */ |