29 lines
771 B
Plaintext
29 lines
771 B
Plaintext
From 3cf5b5aaa64e673364e8758640e5d5434425235b Mon Sep 17 00:00:00 2001
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
Date: Thu, 9 Oct 2008 12:53:38 +0200
|
|
Subject: [PATCH] fopen returns NULL on failure, not -1
|
|
|
|
References: 432598
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
---
|
|
libmultipath/discovery.c | 2 +-
|
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
|
index e1a67ac..a5ae8aa 100644
|
|
--- a/libmultipath/discovery.c
|
|
+++ b/libmultipath/discovery.c
|
|
@@ -237,7 +237,7 @@ devt2devname (char *devname, char *devt)
|
|
return 1;
|
|
}
|
|
|
|
- if ((fd = fopen("/proc/partitions", "r")) < 0) {
|
|
+ if (!(fd = fopen("/proc/partitions", "r"))) {
|
|
condlog(0, "Cannot open /proc/partitions");
|
|
return 1;
|
|
}
|
|
--
|
|
1.5.2.4
|
|
|