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:
Michael Reed 2015-05-07 19:59:17 -04:00
commit 1978d65bca
2 changed files with 2 additions and 2 deletions

View File

@ -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)) {

View File

@ -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);
}