On 07/27/2016 11:35 AM, Pádraig Brady wrote:
> Hrm, I wonder should we have an errorx to wrap error (EXIT_FAILURE, ...)
> and that can be marked as noreturn? I.E. stick this somewhere?

Well, it seems there are only a couple of places where error() is followed
by exit():

  $ git grep -FA2 'error (' | grep -F 'exit ('
  src/id.c-          exit (EXIT_FAILURE);
  src/ptx.c-  exit (EXIT_FAILURE);
  src/seq.c-  exit (EXIT_FAILURE);
  src/shred.c-  atexit (clear_random_data);
  src/sort.c-  exit (SORT_FAILURE);
  src/test.c-  test_exit (TEST_FAILURE);
  src/whoami.c-      exit (EXIT_FAILURE);

Therefore, I'd leave it more explicitly and readable rather than
inventing another wrapper to remember.

Have a nice day,
Berny

Reply via email to