aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2023-04-26 01:01:42 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2023-04-26 01:01:42 -0400
commit99beaf17f0de995d1f0f82598a651d04ace48ff9 (patch)
tree3d727fe2ce4ae68befbf996c29ab1b9aec74655a /main.c
parent2c8c1166d81a5c0fe6f335742ee24319ce60bfa8 (diff)
downloadwhatami-99beaf17f0de995d1f0f82598a651d04ace48ff9.tar.gz
bugfix: initialize device_count to zero
Diffstat (limited to 'main.c')
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index e173ae5..0486f11 100644
--- a/main.c
+++ b/main.c
@@ -50,6 +50,7 @@ int main() {
printf("Block devices:\n");
struct Block_Device **block_device;
+ device_count = 0;
block_device = get_block_devices(&device_count);
if (!block_device) {
fprintf(stderr, "Unable to enumerate block devices\n");