diff options
author | N.N. <matju@users.sourceforge.net> | 2009-06-10 23:05:07 +0000 |
---|---|---|
committer | N.N. <matju@users.sourceforge.net> | 2009-06-10 23:05:07 +0000 |
commit | bf63d95cf877cd6dc3b451cdb57323ef73d70a80 (patch) | |
tree | b86eeb6e8754479d8f4413c5590075c3945d5348 /desiredata/src | |
parent | 2339c64dab2b486030d9ecaa41c7bdc2bea2b421 (diff) |
to fix mingw32 problem: jump to label 'usage' crosses initialization of 'short int version'
svn path=/trunk/; revision=11744
Diffstat (limited to 'desiredata/src')
-rw-r--r-- | desiredata/src/u_pdreceive.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desiredata/src/u_pdreceive.c b/desiredata/src/u_pdreceive.c index aca715f8..e58fb177 100644 --- a/desiredata/src/u_pdreceive.c +++ b/desiredata/src/u_pdreceive.c @@ -42,7 +42,7 @@ static void x_closesocket(int fd); static void dopoll(); #define BUFSIZE 4096 -int main(int argc, char **argv) { +int main(int argc, char **argv) {{ // open extra scope because of goto and decls int portno; struct sockaddr_in server; if (argc < 2 || sscanf(argv[1],"%d",&portno)<1 || portno<=0) goto usage; @@ -75,6 +75,7 @@ int main(int argc, char **argv) { if (protocol == SOCK_STREAM) if (listen(sockfd, 5) < 0) {sockerror("listen"); x_closesocket(sockfd); return 1;} /* now loop forever selecting on sockets */ while (1) dopoll(); + } // close extra scope so that we can goto. usage: fprintf(stderr, "usage: pdreceive <portnumber> [udp|tcp]\n"); fprintf(stderr, "(default is tcp)\n"); |