version 1.143, 2014/04/23 19:09:16 |
version 1.144, 2014/04/23 21:06:41 |
Line 471 main(int argc, char *argv[]) |
|
Line 471 main(int argc, char *argv[]) |
|
* manpath_parse() wants to do it. |
* manpath_parse() wants to do it. |
*/ |
*/ |
if (argc > 0) { |
if (argc > 0) { |
dirs.paths = mandoc_calloc(argc, |
dirs.paths = mandoc_reallocarray(NULL, |
sizeof(char *)); |
argc, sizeof(char *)); |
dirs.sz = (size_t)argc; |
dirs.sz = (size_t)argc; |
for (i = 0; i < argc; i++) |
for (i = 0; i < argc; i++) |
dirs.paths[i] = mandoc_strdup(argv[i]); |
dirs.paths[i] = mandoc_strdup(argv[i]); |
Line 1784 putkeys(const struct mpage *mpage, |
|
Line 1784 putkeys(const struct mpage *mpage, |
|
s->mask |= v; |
s->mask |= v; |
return; |
return; |
} else if (NULL == s) { |
} else if (NULL == s) { |
s = mandoc_calloc(sizeof(struct str) + sz + 1, 1); |
s = mandoc_calloc(1, sizeof(struct str) + sz + 1); |
memcpy(s->key, cp, sz); |
memcpy(s->key, cp, sz); |
ohash_insert(htab, slot, s); |
ohash_insert(htab, slot, s); |
} |
} |
|
|
hash_halloc(size_t sz, void *arg) |
hash_halloc(size_t sz, void *arg) |
{ |
{ |
|
|
return(mandoc_calloc(sz, 1)); |
return(mandoc_calloc(1, sz)); |
} |
} |
|
|
static void * |
static void * |