[PATCH v4l-utils v2 1/4] v4l2-compliance: use warn() in warn_once()

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

 



Use the warn() macro in warn_once() instead of duplicating its contents.

Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
 utils/v4l2-compliance/v4l2-compliance.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2-compliance.h
index ac709e94a537..f7e1ea5d7124 100644
--- a/utils/v4l2-compliance/v4l2-compliance.h
+++ b/utils/v4l2-compliance/v4l2-compliance.h
@@ -206,12 +206,7 @@ private:
 									\
 		if (!show) {						\
 			show = true;					\
-			warnings++;					\
-			if (show_warnings)				\
-				printf("\t\twarn: %s(%d): " fmt,	\
-					__FILE__, __LINE__, ##args); 	\
-			if (exit_on_warn)				\
-				exit(1);				\
+			warn(fmt, ##args);				\
 		}							\
 	} while (0)
 
-- 
2.20.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux