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
|
@ -249,7 +249,7 @@ void add_translation(struct critbit_tree **cbp, const char *key, int i) {
|
|||
size_t len = strlen(str);
|
||||
if (!cb) {
|
||||
// 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);
|
||||
cb_insert(cb, buffer, len);
|
||||
|
|
Loading…
Reference in New Issue