fix a pointer signedness issue
[asterisk/asterisk.git] / http.c
diff --git a/http.c b/http.c
index 736dfbd..a6bc5b0 100644 (file)
--- a/http.c
+++ b/http.c
  * \ref AstHTTP - AMI over the http protocol
  */
 
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
 #include <sys/types.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <pthread.h>
 
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
 #include "asterisk/cli.h"
 #include "asterisk/http.h"
 #include "asterisk/utils.h"
@@ -461,7 +461,7 @@ static void *http_root(void *data)
 {
        int fd;
        struct sockaddr_in sin;
-       int sinlen;
+       socklen_t sinlen;
        struct ast_http_server_instance *ser;
        pthread_t launched;
        pthread_attr_t attr;
@@ -493,9 +493,6 @@ static void *http_root(void *data)
                                close(ser->fd);
                                free(ser);
                        }
-               } else {
-                       close(ser->fd);
-                       free(ser);
                }
        }
        return NULL;