diff options
Diffstat (limited to 'src/pies.c')
-rw-r--r-- | src/pies.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -101,9 +101,9 @@ str_to_config_syntax (const char *str, enum config_syntax *psynt) void add_config (enum config_syntax syntax, const char *name) { - struct config_file *file = xmalloc (sizeof (file[0])); + struct config_file *file = grecs_malloc (sizeof (file[0])); file->syntax = syntax; - file->name = xstrdup (name); + file->name = grecs_strdup (name); if (!config_list) config_list = grecs_list_create (); grecs_list_append (config_list, file); @@ -285,7 +285,7 @@ create_action (struct component *comp, int allflag = 0; struct action *act; - retv = xcalloc (argc, sizeof *retv); + retv = grecs_calloc (argc, sizeof *retv); if (argc == 0 || (argc == 1 && strcmp (getarg (val, 0, locus), "*") == 0)) allflag = 1; else @@ -342,7 +342,7 @@ create_action (struct component *comp, return NULL; } - act = xzalloc (sizeof *act); + act = grecs_zalloc (sizeof *act); if (!allflag) { act->nstat = retc; @@ -451,12 +451,12 @@ config_array_to_argv (grecs_value_t *val, grecs_locus_t *locus, size_t *pargc) char **argv; argc = val->v.arg.c; - argv = xcalloc (argc + 1, sizeof (argv[0])); + argv = grecs_calloc (argc + 1, sizeof (argv[0])); for (i = j = 0; i < argc; i++) { if (assert_grecs_value_type (locus, val->v.arg.v[i], GRECS_TYPE_STRING) == 0) - argv[j++] = xstrdup (val->v.arg.v[i]->v.string); + argv[j++] = grecs_strdup (val->v.arg.v[i]->v.string); } argv[j] = NULL; if (pargc) @@ -694,7 +694,7 @@ _cb_redir (enum grecs_callback_command cmd, break; case redir_file: - rp->v.file = xstrdup (value->v.arg.v[1]->v.string); + rp->v.file = grecs_strdup (value->v.arg.v[1]->v.string); break; } } @@ -1183,7 +1183,7 @@ make_full_name (const char *dir, const char *file) while (len > 0 && dir[len - 1] == '/') len--; - p = xmalloc (len + 1 + strlen (file) + 1); + p = grecs_malloc (len + 1 + strlen (file) + 1); memcpy (p, dir, len); p[len++] = '/'; strcpy (p + len, file); @@ -1293,7 +1293,7 @@ component_verify (struct component *comp, grecs_locus_t *locus) COMPERR (grecs_warning, "%s", _("TCPMUX master not specified, assuming \"tcpmux\"")); - comp->tcpmux = xstrdup ("tcpmux"); + comp->tcpmux = grecs_strdup ("tcpmux"); } } else if (comp->tcpmux) @@ -1366,10 +1366,10 @@ component_create (const char *name) struct component *comp = progman_lookup_component (name); if (!comp) { - comp = xzalloc (sizeof (*comp)); + comp = grecs_zalloc (sizeof (*comp)); comp->facility = log_facility; comp->redir[RETR_OUT].type = comp->redir[RETR_ERR].type = redir_null; - comp->tag = xstrdup (name); + comp->tag = grecs_strdup (name); comp->socket_type = SOCK_STREAM; } return comp; @@ -1956,7 +1956,7 @@ request_restart_components (size_t cc, char **cv) char **argv; size_t i; - argv = xcalloc (cc + 4, sizeof (*argv)); + argv = grecs_calloc (cc + 4, sizeof (*argv)); argv[0] = "piesctl"; argv[1] = "--url"; argv[2] = (char*) pies_control_url (); @@ -2121,9 +2121,9 @@ set_mailer_argcv () exit (EX_CONFIG); } mailer_argc = ws.ws_wordc; - mailer_argv = xcalloc (mailer_argc + 1, sizeof (mailer_argv[0])); + mailer_argv = grecs_calloc (mailer_argc + 1, sizeof (mailer_argv[0])); for (i = 0; i < mailer_argc; i++) - mailer_argv[i] = xstrdup (ws.ws_wordv[i]); + mailer_argv[i] = grecs_strdup (ws.ws_wordv[i]); mailer_argv[i] = NULL; wordsplit_free (&ws); } |