Merge Trond.
authorBrian Aker <brian@gaz>
Wed, 14 Apr 2010 23:51:37 +0000 (16:51 -0700)
committerBrian Aker <brian@gaz>
Wed, 14 Apr 2010 23:51:37 +0000 (16:51 -0700)
1  2 
example/memcached_light.c

index 4a53217ab831dfd966cae7cc9990c4455770da7d,489ec1e4dd9e1e7f71d84f5cfa572ffcf654c337..c059f708eb09b09e94c39fd0fdf8c3a73920ca0c
@@@ -319,6 -432,13 +432,13 @@@ int main(int argc, char **argv
      return 1;
    }
  
 -  socket_userdata_map= calloc(maxconns, sizeof(struct connection));
++  socket_userdata_map= calloc((size_t)(maxconns), sizeof(struct connection));
+   if (socket_userdata_map == NULL)
+   {
+     fprintf(stderr, "Failed to allocate room for connections\n");
+     return 1;
+   }
    memcached_binary_protocol_set_callbacks(protocol_handle, interface);
    memcached_binary_protocol_set_pedantic(protocol_handle, true);