Browse Source

Use size_t when iterating over port and ssl vars in mg_get_ports

* Parameter passed in indicating size of port and ssl arrays passed
  in is size_t - an unsigned var, make sure to use the same type
  for the iteration variable.
Keith Kyzivat 11 years ago
parent
commit
4e67805153
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -709,7 +709,7 @@ const char *mg_get_option(const struct mg_context *ctx, const char *name)
 
 void mg_get_ports(const struct mg_context *ctx, size_t size, int* ports, int* ssl)
 {
-    int i;
+    size_t i;
     for (i = 0; i < size && i < ctx->num_listening_sockets; i++)
     {
         ssl[i] = ctx->listening_sockets[i].is_ssl;