fcoe-utils/fcoe-utils-1.0.18-fcoemon-Correct-wrong-error-check.patch
Petr Sabata 9a79b1c7b8 1.0.18+ bump
BuildRoot and ExcludeArch cleanup
2011-04-20 11:03:37 +02:00

33 lines
982 B
Diff

From 1511aba0a6586ccd285c0c326f6f9c1a266c6a10 Mon Sep 17 00:00:00 2001
From: Mark Rustad <mark.d.rustad@intel.com>
Date: Fri, 8 Apr 2011 00:30:04 +0000
Subject: [PATCH 14/16] fcoemon: Correct wrong error check.
Correct wrong error check on return value from a socket() call. 0 is a
valid return, and treating it as an error could result in trouble.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: Petr Sabata <psabata@redhat.com>
---
fcoemon.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fcoemon.c b/fcoemon.c
index 77b3fd5..5449ae6 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -607,7 +607,7 @@ static void fcm_vlan_dev_real_dev(char *vlan_ifname, char *real_ifname)
fd = socket(PF_INET, SOCK_DGRAM, 0);
- if (fd <= 0) {
+ if (fd < 0) {
FCM_LOG_ERR(errno, "open vlan query socket error");
return;
}
--
1.7.4.4