summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer2020-05-16 21:04:05 +0000
committerMatthias Schiffer2020-05-16 21:04:05 +0000
commit00b921d80ac0dc47339305d803f865ff43c56d63 (patch)
tree74b9ce2c722072210632f080e394733197147223
parent96c42c5ed3207b8ad1ce836a4426c8700c13b655 (diff)
downloaducert-00b921d80ac0dc47339305d803f865ff43c56d63.tar.gz
Do not print line number in debug messages
The line number does not add any significant information, and it makes the unit tests which check for these debug messages very fragile. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
-rw-r--r--tests/cram/test_ucert.t4
-rw-r--r--ucert.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/cram/test_ucert.t b/tests/cram/test_ucert.t
index 985740d..d4d57b2 100644
--- a/tests/cram/test_ucert.t
+++ b/tests/cram/test_ucert.t
@@ -57,9 +57,9 @@ check that ucert is producing expected results:
---
$ ucert -D -c $TEST_INPUTS/invalid.ucert
- cert_dump(406): cannot parse cert
+ cert_dump: cannot parse cert
[1]
$ ucert-san -D -c $TEST_INPUTS/invalid.ucert
- cert_dump(406): cannot parse cert
+ cert_dump: cannot parse cert
[1]
diff --git a/ucert.c b/ucert.c
index 24349c4..5523b02 100644
--- a/ucert.c
+++ b/ucert.c
@@ -49,10 +49,10 @@ static enum {
static bool quiet;
#ifndef UCERT_STRIP_MESSAGES
-#define DPRINTF(format, ...) \
- do { \
- if (!quiet) \
- fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__); \
+#define DPRINTF(format, ...) \
+ do { \
+ if (!quiet) \
+ fprintf(stderr, "%s: " format, __func__, ## __VA_ARGS__); \
} while (0)
#else
#define DPRINTF(format, ...) do { } while (0)