X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=net.c;h=10fc121912b8d242b7ca15a8081c2e7e490e44c5;hb=d85091bebd5abb6f473a31dd118f4d853d1317c9;hp=674b8c646aa8300419e138c22724c651c6271b93;hpb=0018d755c4a834704217464879bfd699d077664b;p=paraslash.git diff --git a/net.c b/net.c index 674b8c64..10fc1219 100644 --- a/net.c +++ b/net.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2007 Andre Noll + * Copyright (C) 2005-2008 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -147,10 +147,11 @@ int makesock(unsigned l3type, unsigned l4type, int passive, { struct addrinfo *local = NULL, *src, *remote = NULL, *dst, hints; - char *port = make_message("%u", port_number); int rc, on = 1, sockfd = -1, socktype = sock_type(l4type); + char port[6]; /* port number has at most 5 digits */ + sprintf(port, "%u", port_number); /* Set up address hint structure */ memset(&hints, 0, sizeof(hints)); hints.ai_family = l3type;