diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-10 02:21:00 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-10 02:21:00 +0100 |
commit | 7179f51176e1f3af53694e09d7ea2ca602403cf1 (patch) | |
tree | db24424529090c7ac819e2ec9724c855dbb2d53e /src/mds.c | |
parent | typo (diff) | |
download | mds-7179f51176e1f3af53694e09d7ea2ca602403cf1.tar.gz mds-7179f51176e1f3af53694e09d7ea2ca602403cf1.tar.bz2 mds-7179f51176e1f3af53694e09d7ea2ca602403cf1.tar.xz |
no more direct allocations, always use macros, unless using alloca
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -324,10 +324,10 @@ int spawn_and_respawn_server(int fd) pid_t pid; int status; - child_args[0] = strdup(master_server); + fail_if (xstrdup(child_args[0], master_server)); for (i = 1; i < argc; i++) child_args[i] = argv[i]; - child_args[argc + 0] = strdup("--initial-spawn"); + fail_if (xstrdup(child_args[argc + 0], "--initial-spawn")); xsnprintf(fdstr, "--socket-fd=%i", fd); child_args[argc + 1] = fdstr; child_args[argc + 2] = NULL; @@ -401,8 +401,7 @@ int spawn_and_respawn_server(int fd) { first_spawn = 0; free(child_args[argc + 0]); - child_args[argc + 0] = strdup("--respawn"); - fail_if (child_args[argc + 0] == NULL); + fail_if (xstrdup(child_args[argc + 0], "--respawn")); } goto respawn; |