[hackers] [sbase] Use errstr as filled by strtonum() because it is more informative || sin

From: <git_AT_suckless.org>
Date: Fri, 30 Jan 2015 15:07:39 +0100 (CET)

commit 4bd084b7ac4d472e6afa034e2644b0943878a125
Author: sin <sin_AT_2f30.org>
Date: Fri Jan 30 13:59:16 2015 +0000

    Use errstr as filled by strtonum() because it is more informative

diff --git a/libutil/strtonum.c b/libutil/strtonum.c
index 18eb8aa..0779174 100644
--- a/libutil/strtonum.c
+++ b/libutil/strtonum.c
_AT_@ -74,6 +74,6 @@ estrtonum(const char *numstr, long long minval, long long maxval)
 
         ll = strtonum(numstr, minval, maxval, &errstr);
         if (errstr)
- eprintf("strtonum %s: invalid value\n", numstr);
+ eprintf("strtonum %s: %s\n", numstr, errstr);
         return ll;
 }
Received on Fri Jan 30 2015 - 15:07:39 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 30 2015 - 15:12:09 CET