libi3: change scalloc() signature to match calloc()

This commit is contained in:
shdown
2015-08-03 12:50:13 +03:00
parent 05fb909636
commit bc52fae15c
32 changed files with 80 additions and 81 deletions

View File

@ -77,7 +77,7 @@ static int reply_boolean_cb(void *params, int val) {
}
static int reply_string_cb(void *params, const unsigned char *val, size_t len) {
char *str = scalloc(len + 1);
char *str = scalloc(len + 1, 1);
strncpy(str, (const char *)val, len);
if (strcmp(last_key, "error") == 0)
last_reply.error = str;
@ -105,7 +105,7 @@ static int reply_end_map_cb(void *params) {
static int reply_map_key_cb(void *params, const unsigned char *keyVal, size_t keyLen) {
free(last_key);
last_key = scalloc(keyLen + 1);
last_key = scalloc(keyLen + 1, 1);
strncpy(last_key, (const char *)keyVal, keyLen);
return 1;
}