diff options
author | joerg <joerg@pkgsrc.org> | 2011-11-25 22:10:16 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2011-11-25 22:10:16 +0000 |
commit | b70ec46c98fc3cc01c4b186f554992322644bf80 (patch) | |
tree | 4f97dd8cd0ca8301bdbbae87029fd03a052c961a | |
parent | f15973d09bb0e64ebed73cc9ddb4230b737d4d80 (diff) | |
download | pkgsrc-b70ec46c98fc3cc01c4b186f554992322644bf80.tar.gz |
Don't expect that NULL can be casted to char without warning.
-rw-r--r-- | net/arpd/distinfo | 3 | ||||
-rw-r--r-- | net/arpd/patches/patch-readconfig.c | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/net/arpd/distinfo b/net/arpd/distinfo index a77f632f1d3..2ef69373c35 100644 --- a/net/arpd/distinfo +++ b/net/arpd/distinfo @@ -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 diff --git a/net/arpd/patches/patch-readconfig.c b/net/arpd/patches/patch-readconfig.c new file mode 100644 index 00000000000..7f9a7da9106 --- /dev/null +++ b/net/arpd/patches/patch-readconfig.c @@ -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++; |