summaryrefslogtreecommitdiff
path: root/lib/version-etc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-12-20 16:10:29 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-12-20 16:14:29 -0800
commitb823b5dc51510ba59dd0d00d677070b9a2e1180a (patch)
tree62a09da84d5b663e34095588e69ea40324fd7b00 /lib/version-etc.c
parentf0c406c2cad3d701e8b331a6a82074bd01b3256a (diff)
downloadgnulib-b823b5dc51510ba59dd0d00d677070b9a2e1180a.tar.gz
version-etc: allow zero authors
* lib/version-etc.c (version_etc_arn): If no authors are given, omit authorship info instead of dumping core. No need to include stdlib.h now.
Diffstat (limited to 'lib/version-etc.c')
-rw-r--r--lib/version-etc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/version-etc.c b/lib/version-etc.c
index 56dc249296..dfec8ad5a0 100644
--- a/lib/version-etc.c
+++ b/lib/version-etc.c
@@ -23,7 +23,6 @@
#include <stdarg.h>
#include <stdio.h>
-#include <stdlib.h>
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
@@ -95,8 +94,9 @@ There is NO WARRANTY, to the extent permitted by law.\n\
switch (n_authors)
{
case 0:
- /* The caller must provide at least one author name. */
- abort ();
+ /* No authors are given. The caller should output authorship
+ info after calling this function. */
+ break;
case 1:
/* TRANSLATORS: %s denotes an author name. */
fprintf (stream, _("Written by %s.\n"), authors[0]);