* nscd/nscd_getserv_r.c (__nscd_getservbyport_r): Pass cp

instead of portstr to nscd_getserv_r.  Patch by 
Roman Kagan <rkagan@mail.ru>.
2008-06-03  Jakub Jelinek  <jakub@redhat.com>

	* nscd/nscd_getserv_r.c (__nscd_getservbyport_r): Pass cp
	instead of portstr to nscd_getserv_r.  Patch by
	Roman Kagan <rkagan@mail.ru>.
This commit is contained in:
Jakub Jelinek 2008-06-03 10:22:52 +00:00
parent 10bb97c793
commit ee78670e26
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-06-03 Jakub Jelinek <jakub@redhat.com>
* nscd/nscd_getserv_r.c (__nscd_getservbyport_r): Pass cp
instead of portstr to nscd_getserv_r. Patch by
Roman Kagan <rkagan@mail.ru>.
2008-05-26 Jim Meyering <meyering@redhat.com> 2008-05-26 Jim Meyering <meyering@redhat.com>
Remove more useless "if" tests before "free". Remove more useless "if" tests before "free".

View File

@ -53,7 +53,7 @@ __nscd_getservbyport_r (int port, const char *proto,
portstr[sizeof (portstr) - 1] = '\0'; portstr[sizeof (portstr) - 1] = '\0';
char *cp = _itoa_word (port, portstr + sizeof (portstr) - 1, 10, 0); char *cp = _itoa_word (port, portstr + sizeof (portstr) - 1, 10, 0);
return nscd_getserv_r (portstr, portstr + sizeof (portstr) - cp, proto, return nscd_getserv_r (cp, portstr + sizeof (portstr) - cp, proto,
GETSERVBYPORT, result_buf, buf, buflen, result); GETSERVBYPORT, result_buf, buf, buflen, result);
} }