aboutsummaryrefslogtreecommitdiffstats
path: root/src/redo.c
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2014-11-24 21:47:23 +0100
committerTharre <tharre3@gmail.com>2014-11-24 21:47:23 +0100
commita057243ef11e64a9659ff5f5a96cd3b14777dafc (patch)
tree1e9e86ef59db58e0857922367ab772e095fa4e5a /src/redo.c
parentf907d26292168cd9ba8900f3deec513c257c4ffc (diff)
downloadredo-a057243ef11e64a9659ff5f5a96cd3b14777dafc.tar.gz
redo-a057243ef11e64a9659ff5f5a96cd3b14777dafc.tar.xz
redo-a057243ef11e64a9659ff5f5a96cd3b14777dafc.zip
Rename diem to fatal to further confuse matters.
It's actually pretty easy now, fatal() is used as a short cut for appending the strerror'd errno, while die() is just the generic version of printing errors that behaves just like fprintf(stderr, msg) + exit().
Diffstat (limited to 'src/redo.c')
-rw-r--r--src/redo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/redo.c b/src/redo.c
index b460b55..86936b4 100644
--- a/src/redo.c
+++ b/src/redo.c
@@ -38,9 +38,9 @@ void prepare_env() {
/* set REDO_ROOT */
char *cwd = getcwd(NULL, 0);
if (!cwd)
- diem("redo: failed to obtain cwd");
+ fatal("redo: failed to obtain cwd");
if (setenv("REDO_ROOT", cwd, 0))
- diem("redo: failed to setenv() REDO_ROOT to %s", cwd);
+ fatal("redo: failed to setenv() REDO_ROOT to %s", cwd);
free(cwd);
/* set REDO_MAGIC */
@@ -48,7 +48,7 @@ void prepare_env() {
char magic_str[digits(UINT_MAX) + 1];
sprintf(magic_str, "%u", rand());
if (setenv("REDO_MAGIC", magic_str, 0))
- diem("redo: failed to setenv() REDO_MAGIC to %s", magic_str);
+ fatal("redo: failed to setenv() REDO_MAGIC to %s", magic_str);
}
int main(int argc, char *argv[]) {