summaryrefslogtreecommitdiff
path: root/timezone/zic.c
diff options
context:
space:
mode:
Diffstat (limited to 'timezone/zic.c')
-rw-r--r--timezone/zic.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/timezone/zic.c b/timezone/zic.c
index de706e8316..ddf155f279 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -1,6 +1,6 @@
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)zic.c 7.99";
+static char elsieid[] = "@(#)zic.c 7.100";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -617,7 +617,7 @@ const char * const tofile;
result = link(fromname, toname);
#if (HAVE_SYMLINK - 0)
if (result != 0) {
- char *s = (char *) tofile;
+ const char *s = tofile;
register char *symlinkcontents = NULL;
while ((s = strchr(s+1, '/')) != NULL)
symlinkcontents = ecatalloc(symlinkcontents, "../");
@@ -1918,10 +1918,12 @@ const char * const type;
buf = erealloc(buf, (int) (132 + strlen(yitcommand) + strlen(type)));
(void) sprintf(buf, "%s %d %s", yitcommand, year, type);
result = system(buf);
- if (result == 0)
- return TRUE;
- if (result == (1 << 8))
- return FALSE;
+ if (WIFEXITED(result)) switch (WEXITSTATUS(result)) {
+ case 0:
+ return TRUE;
+ case 1:
+ return FALSE;
+ }
error(_("Wild result from command execution"));
(void) fprintf(stderr, _("%s: command was '%s', result was %d\n"),
progname, buf, result);