mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-23 08:40:07 +01:00
Fix some cppcheck warnings.
Despite it is nonsense and cppcheck should understand the code better :-)
This commit is contained in:
@@ -303,7 +303,11 @@ static int create_empty_header(const char *new_file, const char *old_file,
|
||||
|
||||
log_dbg("Creating empty file %s of size %lu.", new_file, (unsigned long)size);
|
||||
|
||||
if (!size || !(buf = malloc(size)))
|
||||
if (!size)
|
||||
return -EINVAL;
|
||||
|
||||
buf = malloc(size);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
memset(buf, 0, size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user