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:
Lennart Poettering
2018-06-11 17:55:17 +02:00
parent d28b67d46a
commit 66ae5130a0
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -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;
}