From c893bc4aa7a674c6888aacc8249b3c4a8f6bf12a Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 30 Jan 2009 18:47:32 -0200 Subject: Janitor: Correct make distcheck and compiler warnings. Compiler warnings are spread on other packages, with a warning in the format: /usr/include/X11/Xtrans/Xtranssock.c:548: warning: 'ciptr' may be used uninitialized in this function so the code was slightly changed so that the compiler would not "think" it could be used without initialization. --- Xtranssock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Xtranssock.c') diff --git a/Xtranssock.c b/Xtranssock.c index ad3e116..eabb587 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -555,8 +555,12 @@ TRANS(SocketOpenCOTSClientBase) (char *transname, char *protocol, while ((i = TRANS(SocketSelectFamily) (i, transname)) >= 0) { if ((ciptr = TRANS(SocketOpen) ( - i, Sockettrans2devtab[i].devcotsname)) != NULL) + i, Sockettrans2devtab[i].devcotsname)) != NULL) { + /* Save the index for later use */ + + ciptr->index = i; break; + } } if (i < 0) { if (i == -1) @@ -568,10 +572,6 @@ TRANS(SocketOpenCOTSClientBase) (char *transname, char *protocol, return NULL; } - /* Save the index for later use */ - - ciptr->index = i; - return ciptr; } -- cgit v1.2.3