summaryrefslogtreecommitdiff
path: root/net/arpd/patches
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2011-11-25 22:10:16 +0000
committerjoerg <joerg@pkgsrc.org>2011-11-25 22:10:16 +0000
commitb70ec46c98fc3cc01c4b186f554992322644bf80 (patch)
tree4f97dd8cd0ca8301bdbbae87029fd03a052c961a /net/arpd/patches
parentf15973d09bb0e64ebed73cc9ddb4230b737d4d80 (diff)
downloadpkgsrc-b70ec46c98fc3cc01c4b186f554992322644bf80.tar.gz
Don't expect that NULL can be casted to char without warning.
Diffstat (limited to 'net/arpd/patches')
-rw-r--r--net/arpd/patches/patch-readconfig.c22
1 files changed, 22 insertions, 0 deletions
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++;