[hackers] [sbase] No need to use enprintf() with EXIT_FAILURE || sin

From: <git_AT_suckless.org>
Date: Thu, 30 Jan 2014 15:55:30 +0100

commit 94e97f19cd5505d455c4378a466e34b7aeced196
Author: sin <sin_AT_2f30.org>
Date: Thu Jan 30 13:54:16 2014 +0000

    No need to use enprintf() with EXIT_FAILURE
    
    eprintf() does just that.

diff --git a/du.c b/du.c
index c6289cd..df7d3c0 100644
--- a/du.c
+++ b/du.c
_AT_@ -151,7 +151,7 @@ du(const char *path)
                         if (S_ISLNK(st.st_mode)) {
                                 if (snprintf(file, sizeof(file), "%s/%s",
                                              cwd, dent->d_name) >= sizeof(file))
- enprintf(EXIT_FAILURE, "path too long
");
+ eprintf("path too long
");
                         } else {
                                 xrealpath(dent->d_name, file);
                         }
diff --git a/mktemp.c b/mktemp.c
index 8cfd4c9..d2188d1 100644
--- a/mktemp.c
+++ b/mktemp.c
_AT_@ -43,7 +43,7 @@ main(int argc, char *argv[])
                 tmpdir = p;
 
         if (snprintf(tmppath, sizeof(tmppath), "%s/%s", tmpdir, template) >= sizeof(tmppath))
- enprintf(EXIT_FAILURE, "path too long
");
+ eprintf("path too long
");
         if (dflag) {
                 if (!mkdtemp(tmppath)) {
                         if (!qflag)
diff --git a/util/recurse.c b/util/recurse.c
index 6ac235e..1db70d2 100644
--- a/util/recurse.c
+++ b/util/recurse.c
_AT_@ -34,7 +34,7 @@ recurse(const char *path, void (*fn)(const char *))
                 while (--p >= buf && *p == '/') *p ='
Received on Thu Jan 30 2014 - 15:55:30 CET

This archive was generated by hypermail 2.3.0 : Thu Jan 30 2014 - 16:00:16 CET