Module Name:    src
Committed By:   christos
Date:           Wed Dec 16 23:00:39 UTC 2015

Modified Files:
        src/usr.bin/ftp: ftp_var.h

Log Message:
make DPRINTF/DWARN always statements.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/ftp/ftp_var.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ftp/ftp_var.h
diff -u src/usr.bin/ftp/ftp_var.h:1.83 src/usr.bin/ftp/ftp_var.h:1.84
--- src/usr.bin/ftp/ftp_var.h:1.83	Mon Jan 12 09:17:08 2015
+++ src/usr.bin/ftp/ftp_var.h	Wed Dec 16 18:00:39 2015
@@ -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 @@ extern	struct option	optiontab[];
 #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>")

Reply via email to