diff --git a/util.c b/util.c index dc9d5dd..32d521c 100644 --- a/util.c +++ b/util.c @@ -259,9 +259,7 @@ const char *tmp_string(void) gethostname(hostname, sizeof(hostname)-1); #endif hostname[sizeof(hostname)-1] = 0; - if (asprintf(&ret, "%s.%u", hostname, (unsigned)getpid()) == -1) { - fatal("could not allocate tmp_string\n"); - } + x_asprintf(&ret, "%s.%u", hostname, (unsigned)getpid()); } return ret;