mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
Merge pull request #2587 from mkfifo/master
[RFC] fixing 2 occurrences of incorrect usage of sizeof Reviewed-by: Scott Prager <splinterofchaos@gmail.com> Reviewed-by: oni-link <knil.ino@gmail.com> Reviewed-by: Michael Reed <m.reed@mykolab.com>
This commit is contained in:
commit
1978d65bca
@ -18575,7 +18575,7 @@ void func_dump_profile(FILE *fd)
|
||||
if (todo == 0)
|
||||
return; /* nothing to dump */
|
||||
|
||||
sorttab = xmalloc(sizeof(ufunc_T) * todo);
|
||||
sorttab = xmalloc(sizeof(ufunc_T *) * todo);
|
||||
|
||||
for (hi = func_hashtab.ht_array; todo > 0; ++hi) {
|
||||
if (!HASHITEM_EMPTY(hi)) {
|
||||
|
@ -268,7 +268,7 @@ char **server_address_list(size_t *size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char **addrs = xcalloc((size_t) servers.ga_len, sizeof(const char **));
|
||||
char **addrs = xcalloc((size_t) servers.ga_len, sizeof(const char *));
|
||||
for (int i = 0; i < servers.ga_len; i++) {
|
||||
addrs[i] = xstrdup(((Server **)servers.ga_data)[i]->addr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user