blockdev-util: let's initialize return parameter on success
We document the rule that return values >= 0 of functions are supposed to indicate success, and that in case of success all return parameters should be initialized. Let's actually do so. Just a tiny coding style fix-up.
This commit is contained in:
@@ -81,6 +81,7 @@ int get_block_device(const char *path, dev_t *dev) {
|
||||
if (F_TYPE_EQUAL(sfs.f_type, BTRFS_SUPER_MAGIC))
|
||||
return btrfs_get_block_device(path, dev);
|
||||
|
||||
*dev = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user