chiark / gitweb /
rsa: Strip a couple of spurious newlines from pub key messages
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 23 Nov 2019 23:38:58 +0000 (23:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 17:08:52 +0000 (17:08 +0000)
Neither cfgfatal nor slilog want a trailing newline.

There are lots of this kind of problem in secnet.  I'm just fixing two
I noticed here, in code I touched.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
rsa.c

diff --git a/rsa.c b/rsa.c
index 3f2fbd158cc4d07940c598d3fa0629c852ac3ac9..b633f72d9eca65aae395609688a7596bdf7f47ed 100644 (file)
--- a/rsa.c
+++ b/rsa.c
@@ -356,10 +356,10 @@ static struct rsapub *rsa_loadpub_core(RSAPUB_BNS(RSAPUB_LOADCORE_DEFBN)
 #define RSAPUB_LOADCORE_GETBN(ix,en,what)                              \
     if (mpz_init_set_str(&st->en,en##s,10)!=0) {                       \
        LDPUBFATAL(&en##_loc, what " \"%s\" is not a "                  \
-                "decimal number string\n",en##s);                      \
+                "decimal number string",en##s);                        \
     }                                                                  \
     if (mpz_sizeinbase(&st->en, 256) > RSA_MAX_MODBYTES) {             \
-       LDPUBFATAL(&en##_loc, "implausibly large " what "\n");          \
+       LDPUBFATAL(&en##_loc, "implausibly large " what);               \
     }
 
     RSAPUB_BNS(RSAPUB_LOADCORE_GETBN)