]> arthur.barton.de Git - ngircd.git/commitdiff
Add "+DEBUG" to the version string only when configured with --enable-debug
authorAlexander Barton <alex@barton.de>
Mon, 2 Jan 2023 22:51:15 +0000 (23:51 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 2 Jan 2023 22:51:15 +0000 (23:51 +0100)
The debug log messages are always available and a runtime option (since
commit c7de505c), but the assert()'s are only active when ngIRCd was
configured with the "--enable-debug" option.

So only add "+DEBUG" to the version string when the latter is the case.

src/ngircd/ngircd.c

index 76ea8d38b7f31d6b1951f9f4d6f4490b208cb8da..772d9db6c3dc17e5726136186c0cc34df17963c0 100644 (file)
@@ -341,11 +341,13 @@ Fill_Version(void)
        strlcat(NGIRCd_VersionAddition, "CHARCONV",
                sizeof NGIRCd_VersionAddition);
 #endif
+#ifdef DEBUG
        if (NGIRCd_VersionAddition[0])
                strlcat(NGIRCd_VersionAddition, "+",
                        sizeof NGIRCd_VersionAddition);
        strlcat(NGIRCd_VersionAddition, "DEBUG",
                sizeof NGIRCd_VersionAddition);
+#endif
 #ifdef IDENTAUTH
        if (NGIRCd_VersionAddition[0])
                strlcat(NGIRCd_VersionAddition, "+",