Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp make DPRINTF/DWARN always statements.



details:   https://anonhg.NetBSD.org/src/rev/6ea50fa6db60
branches:  trunk
changeset: 342331:6ea50fa6db60
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 16 23:00:39 2015 +0000

description:
make DPRINTF/DWARN always statements.

diffstat:

 usr.bin/ftp/ftp_var.h |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r 0bbe2fd307e5 -r 6ea50fa6db60 usr.bin/ftp/ftp_var.h
--- a/usr.bin/ftp/ftp_var.h     Wed Dec 16 21:11:47 2015 +0000
+++ b/usr.bin/ftp/ftp_var.h     Wed Dec 16 23:00:39 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftp_var.h,v 1.83 2015/01/12 14:17:08 christos Exp $    */
+/*     $NetBSD: ftp_var.h,v 1.84 2015/12/16 23:00:39 christos Exp $    */
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -337,11 +337,12 @@
 #endif
 
 #ifdef NO_DEBUG
-#define DPRINTF(...)
-#define DWARN(...)
+#define DPRINTF(...)   (void)0
+#define DWARN(...)     (void)0
 #else
-#define DPRINTF(...)   if (ftp_debug) (void)fprintf(ttyout, __VA_ARGS__)
-#define DWARN(...)     if (ftp_debug) warn(__VA_ARGS__)
+#define DWFTP(a)       do a; while (/*CONSTCOND*/0)
+#define DPRINTF(...)   DWFTP(if (ftp_debug) (void)fprintf(ttyout, __VA_ARGS__))
+#define DWARN(...)     DWFTP(if (ftp_debug) warn(__VA_ARGS__))
 #endif
 
 #define STRorNULL(s)   ((s) ? (s) : "<null>")



Home | Main Index | Thread Index | Old Index