git.samba.org
/
nss_wrapper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd517c7
)
nwrap: slightly clean flow by removing an else branch in nwrap_getaddrinfo
author
Michael Adam
<obnox@samba.org>
Sun, 8 Nov 2015 23:55:00 +0000
(
00:55
+0100)
committer
Michael Adam
<obnox@samba.org>
Wed, 11 Nov 2015 09:51:21 +0000
(10:51 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
src/nss_wrapper.c
patch
|
blob
|
history
diff --git
a/src/nss_wrapper.c
b/src/nss_wrapper.c
index e1edd7e15f11bfcf2870d7a6e67dcacca077e360..988eb1d4f5d2d1262c9cc1c5a0a7ca230809b44a 100644
(file)
--- a/
src/nss_wrapper.c
+++ b/
src/nss_wrapper.c
@@
-5102,11
+5102,10
@@
static int nwrap_getaddrinfo(const char *node,
}
s = getservbyname(service, proto);
- if (s != NULL) {
- port = ntohs(s->s_port);
- } else {
+ if (s == NULL) {
return EAI_NONAME;
}
+ port = ntohs(s->s_port);
}
valid_port: