Don't expect that NULL can be casted to char without warning.

This commit is contained in:
joerg 2011-11-25 22:10:16 +00:00
parent ef233ffecb
commit 2bfb9c1d48
2 changed files with 24 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.7 2006/03/28 16:05:47 joerg Exp $
$NetBSD: distinfo,v 1.8 2011/11/25 22:10:16 joerg Exp $
SHA1 (arpd.tar.gz) = c23ea6f7fa1c442331bcf120f32d41f789ee369a
RMD160 (arpd.tar.gz) = 8e98624ae9dc028ccd60695dadc030b853ab22a6
@ -8,3 +8,4 @@ SHA1 (patch-ab) = 5e0c468cd51bdd388fadf4fd9c6e7e92a0475456
SHA1 (patch-ac) = 565f484cc246984aeeb6f414882aa2ccc6e33872
SHA1 (patch-ad) = f28a6c62965fa7a8bd610e962773c019c8340211
SHA1 (patch-ae) = d4457cefe4bd96d422e9abbd8e8ac5b741de2a31
SHA1 (patch-readconfig.c) = 9413ec3ed7d138b0a4c1d9838f535e9593719202

View file

@ -0,0 +1,22 @@
$NetBSD: patch-readconfig.c,v 1.1 2011/11/25 22:10:16 joerg Exp $
--- readconfig.c.orig 2011-11-25 14:10:26.000000000 +0000
+++ readconfig.c
@@ -52,7 +52,7 @@ pJ_read_config(FILE * pConfigFile, char
*/
for (nFields = 0;
- (((char *) pFields) + (nFields * nSize))[0] != (char) NULL;
+ (((char *) pFields) + (nFields * nSize))[0] != '\0';
nFields++);
Q_INIT(pCH, sizeof(*pCH));
@@ -61,7 +61,7 @@ pJ_read_config(FILE * pConfigFile, char
while (fgets(szSlusk, J_CONF_STR, pConfigFile)) {
if ((strlen(szSlusk) != 0) &&
(szSlusk[strlen(szSlusk) - 1] == '\n'))
- szSlusk[strlen(szSlusk) - 1] = (char) NULL;
+ szSlusk[strlen(szSlusk) - 1] = '\0';
szRow = strdup(szSlusk);
nRow++;