libi3: change scalloc() signature to match calloc()
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user