summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>2002-10-21 21:57:59 +0000
committerGarrett Wollman <wollman@FreeBSD.org>2002-10-21 21:57:59 +0000
commit88196acfd8953d3a8cd15c02070402f7c3d31b22 (patch)
tree44e0f85a32d7dcf73fb3b7cdb62957c5ad30438d
parentUse local distfile and remove WWW. (diff)
Fix logic error in error-message printing code. This could never
possibly have worked as written.
Notes
Notes: svn path=/head/; revision=68546
-rw-r--r--net/nylon/files/patch-err.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/nylon/files/patch-err.c b/net/nylon/files/patch-err.c
new file mode 100644
index 000000000000..42d51bef3ccf
--- /dev/null
+++ b/net/nylon/files/patch-err.c
@@ -0,0 +1,24 @@
+--- ../../work.orig/nylon-0.3/err.c Mon Oct 21 17:54:24 2002
++++ err.c Mon Oct 21 17:56:03 2002
+@@ -16,7 +16,7 @@
+
+ extern int verbose;
+
+-char nylon_err[] = { "Error in receiving", /* ERROR_RECV */
++char *nylon_err[] = { "Error in receiving", /* ERROR_RECV */
+ "Error in sending", /* ERROR_SEND */
+ "Error in header", /* ERROR_HEAD */
+ "Error in address", /* ERROR_ADDR */
+@@ -55,10 +55,10 @@
+ #else
+ va_start(ap);
+ #endif /* __STDC__ */
+- if (fmt && (level <= verbose) && errn < NERRS && errn >= 0) {
++ if (fmt && (level <= verbose) && errn < NERRS && errn > 0) {
+ fprintf(stderr, "nylon: [error] ");
+ vfprintf(stderr, fmt, ap);
+- fprintf(stderr, "%s", nylon_err + errn);
++ fprintf(stderr, "%s", nylon_err[errn - 1]);
+ }
+ va_end(ap);
+ }