fix compiler warning
This commit is contained in:
parent
69dd3f5611
commit
b592ac3cb7
|
@ -330,7 +330,10 @@ bool ladish_rotate(const char * src, const char * dst, unsigned int max_backups)
|
|||
bool oldest_found;
|
||||
unsigned int backup;
|
||||
|
||||
ASSERT(max_backups > 0);
|
||||
|
||||
oldest_found = false;
|
||||
path = NULL;
|
||||
older_path = NULL;
|
||||
backup = max_backups;
|
||||
while (backup > 0)
|
||||
|
@ -383,6 +386,8 @@ bool ladish_rotate(const char * src, const char * dst, unsigned int max_backups)
|
|||
backup--;
|
||||
}
|
||||
|
||||
ASSERT(path != NULL);
|
||||
|
||||
log_info("rename '%s' -> '%s'", dst, path);
|
||||
if (rename(dst, path) != 0 && errno != ENOENT)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue