* [Cluster-devel] [PATCH] rgmanager: Make clufindhostname -i predictable
@ 2011-01-12 16:47 Lon Hohberger
2011-01-12 17:07 ` Fabio M. Di Nitto
0 siblings, 1 reply; 2+ messages in thread
From: Lon Hohberger @ 2011-01-12 16:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [PATCH] rgmanager: Make clufindhostname -i predictable
2011-01-12 16:47 [Cluster-devel] [PATCH] rgmanager: Make clufindhostname -i predictable Lon Hohberger
@ 2011-01-12 17:07 ` Fabio M. Di Nitto
0 siblings, 0 replies; 2+ messages in thread
From: Fabio M. Di Nitto @ 2011-01-12 17:07 UTC (permalink / raw)
To: cluster-devel.redhat.com
ACK?ed.
Fabio
On 1/12/2011 5:47 PM, Lon Hohberger wrote:
> 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);
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-12 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12 16:47 [Cluster-devel] [PATCH] rgmanager: Make clufindhostname -i predictable Lon Hohberger
2011-01-12 17:07 ` Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).