aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-11-08 01:01:21 -0800
committerGuy Harris <guy@alum.mit.edu>2017-11-08 01:01:21 -0800
commit64e48543f99b4f504bdef94fdf8a1296a6ec3c6a (patch)
tree1c7273dab383fddff0fea6e55b575ae54ecc0339
parentd8af90d83a7b145512ab45d32648b1a512bad976 (diff)
Don't bother with the numerical error code in error messages.
We probably won't get error codes that don't have messages, and the error code should be hex, anyway.
-rw-r--r--tests/findalldevstest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/findalldevstest.c b/tests/findalldevstest.c
index 375f4d47..56c7cea0 100644
--- a/tests/findalldevstest.c
+++ b/tests/findalldevstest.c
@@ -51,9 +51,8 @@ win32_strerror(DWORD error)
if (errlen >= 2) {
errbuf[errlen - 1] = '\0';
errbuf[errlen - 2] = '\0';
+ errlen -= 2;
}
- p = strchr(errbuf, '\0');
- pcap_snprintf(p, ERRBUF_SIZE+1-(p-errbuf), " (%lu)", error);
return errbuf;
}