summaryrefslogtreecommitdiffstats
path: root/Modules/getnameinfo.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-06-25 06:37:02 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-06-25 06:37:02 (GMT)
commit2b110f97132668bbf19622de4b97ac022db98f74 (patch)
tree634838575adf135dc172bae8ea492929b76928f5 /Modules/getnameinfo.c
parent2106ef0222db83672315bc9864591576981c3a1f (diff)
downloadcpython-2b110f97132668bbf19622de4b97ac022db98f74.zip
cpython-2b110f97132668bbf19622de4b97ac022db98f74.tar.gz
cpython-2b110f97132668bbf19622de4b97ac022db98f74.tar.bz2
Replace snprintf with sprintf.
Diffstat (limited to 'Modules/getnameinfo.c')
-rw-r--r--Modules/getnameinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/getnameinfo.c b/Modules/getnameinfo.c
index 182a3bf..33d6ad3 100644
--- a/Modules/getnameinfo.c
+++ b/Modules/getnameinfo.c
@@ -130,7 +130,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
if (serv == NULL || servlen == 0) {
/* what we should do? */
} else if (flags & NI_NUMERICSERV) {
- snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
+ sprintf(numserv, "%d", ntohs(port));
if (strlen(numserv) > servlen)
return ENI_MEMORY;
strcpy(serv, numserv);