FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-12-2011, 03:47 PM
Lon Hohberger
 
Default rgmanager: Make clufindhostname -i predictable

This is a clean cherry-pick into the RHEL6 branch

Resolves: rhbz#661881

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
rgmanager/src/utils/clufindhostname.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/rgmanager/src/utils/clufindhostname.c b/rgmanager/src/utils/clufindhostname.c
index 42e1691..f8bf7fd 100644
--- a/rgmanager/src/utils/clufindhostname.c
+++ b/rgmanager/src/utils/clufindhostname.c
@@ -24,7 +24,7 @@ main(int argc, char **argv)
void *ptr;
struct in_addr addr4;
struct in6_addr addr6;
- int opt, size, family;
+ int opt, size, family, ret;
char *sep;

if (argc != 3) {
@@ -47,8 +47,10 @@ main(int argc, char **argv)
size = sizeof(addr6);
}

- if (inet_pton(family, optarg, ptr) < 0) {
- perror("inet_pton");
+ ret = inet_pton(family, optarg, ptr);
+ if (ret <= 0) {
+ if (ret < 0)
+ perror("inet_pton");
exit(2);
}

--
1.7.1.1
 

Thread Tools




All times are GMT. The time now is 01:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org