diff options
Diffstat (limited to 'gl/lib')
| -rw-r--r-- | gl/lib/randread.c | 10 | ||||
| -rw-r--r-- | gl/lib/xdectoint.c | 4 | ||||
| -rw-r--r-- | gl/lib/xfts.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/gl/lib/randread.c b/gl/lib/randread.c index e210c7a8d..9c572951d 100644 --- a/gl/lib/randread.c +++ b/gl/lib/randread.c @@ -38,6 +38,7 @@ #include "gettext.h" #define _(msgid) gettext (msgid) +#include "assure.h" #include "minmax.h" #include "rand-isaac.h" #include "stdio-safer.h" @@ -103,11 +104,10 @@ struct randread_source static void randread_error (void const *file_name) { - if (file_name) - error (exit_failure, errno, - errno == 0 ? _("%s: end of file") : _("%s: read error"), - quote (file_name)); - abort (); + affirm (exit_failure); + error (exit_failure, errno, + errno == 0 ? _("%s: end of file") : _("%s: read error"), + quote (file_name)); } /* Simply return a new randread_source object with the default error diff --git a/gl/lib/xdectoint.c b/gl/lib/xdectoint.c index da3e655c6..061a08c22 100644 --- a/gl/lib/xdectoint.c +++ b/gl/lib/xdectoint.c @@ -21,11 +21,11 @@ #include <errno.h> #include <inttypes.h> +#include <stddef.h> #include <stdlib.h> #include "error.h" #include "quote.h" -#include "verify.h" #include "xstrtol.h" /* Parse numeric string N_STR of base BASE, and return the value. @@ -69,7 +69,7 @@ __xnumtoint (char const *n_str, int base, __xdectoint_t min, __xdectoint_t max, /* EINVAL error message is redundant in this context. */ error (err_exit ? err_exit : EXIT_FAILURE, errno == EINVAL ? 0 : errno, "%s: %s", err, quote (n_str)); - assume (false); + unreachable (); } return tnum; diff --git a/gl/lib/xfts.c b/gl/lib/xfts.c index 3981da12c..3cb77610a 100644 --- a/gl/lib/xfts.c +++ b/gl/lib/xfts.c @@ -21,8 +21,8 @@ #include <stdlib.h> #include <errno.h> -#include <assert.h> +#include "assure.h" #include "xalloc.h" #include "xfts.h" @@ -37,7 +37,7 @@ xfts_open (char * const *argv, int options, { /* This can fail in two ways: out of memory or with errno==EINVAL, which indicates it was called with invalid bit_flags. */ - assert (errno != EINVAL); + affirm (errno != EINVAL); xalloc_die (); } |
