diff options
author | wollman <wollman@FreeBSD.org> | 2002-10-22 05:57:59 +0800 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2002-10-22 05:57:59 +0800 |
commit | db41c033fd1ac86ccc216cd2527542c3ba26d606 (patch) | |
tree | 04df8b7b03e6e0f7a59ceb9bf46e464a3b097c9b /net | |
parent | 6b10d0542f4baa9e6e73a8f1101ff729e7017e9a (diff) | |
download | freebsd-ports-gnome-db41c033fd1ac86ccc216cd2527542c3ba26d606.tar.gz freebsd-ports-gnome-db41c033fd1ac86ccc216cd2527542c3ba26d606.tar.zst freebsd-ports-gnome-db41c033fd1ac86ccc216cd2527542c3ba26d606.zip |
Fix logic error in error-message printing code. This could never
possibly have worked as written.
Diffstat (limited to 'net')
-rw-r--r-- | net/nylon/files/patch-err.c | 24 |
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); + } |