[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] version-etc: allow zero authors
From: |
Paul Eggert |
Subject: |
[PATCH] version-etc: allow zero authors |
Date: |
Thu, 20 Dec 2018 16:14:43 -0800 |
* 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.
---
ChangeLog | 6 ++++++
lib/version-etc.c | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd28f3b2c..89407e15e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-12-20 Paul Eggert <address@hidden>
+
+ version-etc: allow zero authors
+ * lib/version-etc.c (version_etc_arn): If no authors are given,
+ omit authorship info instead of dumping core.
+
2018-12-19 Bruno Haible <address@hidden>
lchown tests: Be more permissive regarding errno values.
diff --git a/lib/version-etc.c b/lib/version-etc.c
index 56dc24929..dfec8ad5a 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]);
--
2.19.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] version-etc: allow zero authors,
Paul Eggert <=