env.c: use error.h
This commit is contained in:
parent
6758b06188
commit
e39b9d64c6
1 changed files with 2 additions and 3 deletions
5
env.c
5
env.c
|
|
@ -23,7 +23,7 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include "error.h"
|
||||
#include "env.h"
|
||||
|
||||
static char base[4096];
|
||||
|
|
@ -49,9 +49,8 @@ const char* env_get_dir() {
|
|||
if (!*base) {
|
||||
get_base();
|
||||
if (mkdir(base, 0700) < 0 && errno != EEXIST) {
|
||||
fprintf(stderr, "unable to create '%s': %s\n",
|
||||
fatal("Unable to create '%s': %s\n",
|
||||
base, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
return base;
|
||||
|
|
|
|||
Reference in a new issue