From e57a96eea18a9d341e8573ee661d4aa874ce8f24 Mon Sep 17 00:00:00 2001 From: jca Date: Fri, 27 Jan 2023 18:26:03 +0000 Subject: [PATCH] Fix NUL (\0) vs NULL mismatch, fatal with clang 15 --- converters/ish/Makefile | 2 +- converters/ish/patches/patch-decode_c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/converters/ish/Makefile b/converters/ish/Makefile index a7194821f34..f1a45de8916 100644 --- a/converters/ish/Makefile +++ b/converters/ish/Makefile @@ -2,7 +2,7 @@ COMMENT= binary-to-text file converter DISTNAME= ish201a5 PKGNAME= ish-2.01a5 -REVISION= 0 +REVISION= 1 CATEGORIES= converters PERMIT_PACKAGE= no license diff --git a/converters/ish/patches/patch-decode_c b/converters/ish/patches/patch-decode_c index 50dddea8c07..7bc8fa41702 100644 --- a/converters/ish/patches/patch-decode_c +++ b/converters/ish/patches/patch-decode_c @@ -1,5 +1,6 @@ Hunk #1: When decoding, the status display has Y2K problem. -Hunk #2: fix an infinite loop on unsigned char archs (powerpc and arm*) +Hunk #2: NUL vs NULL mismatch +Hunk #3: fix an infinite loop on unsigned char archs (powerpc and arm*) Index: decode.c --- decode.c.orig @@ -15,6 +16,15 @@ Index: decode.c #ifdef __TURBOC__ memcpy( &timep[0], head->time, 4); timep[1] = timep[0]; +@@ -344,7 +344,7 @@ decish() + fprintf(stderr, "file name change '%s'", name); + strcpy(buff, name); + if((p = (unsigned char *)index(name, '.')) != NULL) +- *p = NULL; ++ *p = '\0'; + do { + sprintf(buff, "%s.%03d", name, i++); + } while(access(buff,0) == 0); @@ -675,8 +675,7 @@ FILE *ipath; int maxlen; char *buff;