forked from github/server
coverity scan CID 22555: sizeof not portable
wrong type in sizeof (pointer instead of struct)
This commit is contained in:
parent
185a2ee29c
commit
0328e84c6c
1 changed files with 1 additions and 1 deletions
|
@ -249,7 +249,7 @@ void add_translation(struct critbit_tree **cbp, const char *key, int i) {
|
||||||
size_t len = strlen(str);
|
size_t len = strlen(str);
|
||||||
if (!cb) {
|
if (!cb) {
|
||||||
// TODO: this will leak, because we do not know how to clean it up */
|
// TODO: this will leak, because we do not know how to clean it up */
|
||||||
*cbp = cb = (struct critbit_tree *)calloc(1, sizeof(struct critbit_tree *));
|
*cbp = cb = (struct critbit_tree *)calloc(1, sizeof(struct critbit_tree));
|
||||||
}
|
}
|
||||||
len = cb_new_kv(str, len, &i, sizeof(int), buffer);
|
len = cb_new_kv(str, len, &i, sizeof(int), buffer);
|
||||||
cb_insert(cb, buffer, len);
|
cb_insert(cb, buffer, len);
|
||||||
|
|
Loading…
Reference in a new issue