mirror of
https://github.com/reactos/ccache.git
synced 2025-03-04 08:47:13 +00:00
Use x_asprintf() instead of asprintf() + fatal()
This commit is contained in:
parent
3ebcc3b8c9
commit
a00e4ae04e
4
util.c
4
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user