mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: check for strftime result
This commit is contained in:
parent
3b47ce0a37
commit
46e013988f
@ -1846,7 +1846,9 @@ static void devices_file_rename_unused(struct cmd_context *cmd)
|
||||
t = time(NULL);
|
||||
if (!(tm = localtime(&t)))
|
||||
return;
|
||||
strftime(datetime_str, sizeof(datetime_str), "%Y%m%d.%H%M%S", tm);
|
||||
|
||||
if (!strftime(datetime_str, sizeof(datetime_str), "%Y%m%d.%H%M%S", tm))
|
||||
return;
|
||||
|
||||
if (dm_snprintf(path2, sizeof(path2), "%s/devices/%s-unused.%s", cmd->system_dir, filename, datetime_str) < 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user