aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance/cec-compliance.h
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-26 00:44:46 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-04-28 11:18:15 +0200
commite8e9eca82c713e04b218f99117120e9aa4ad8bef (patch)
treec15d188c8b05654abb5355420134d4a51809b619 /utils/cec-compliance/cec-compliance.h
parentb8e58b75b57b94378990cedb38459623c06fc3eb (diff)
utils: replace exit with std variant
Also converted to the appropriate macros for clarity. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/cec-compliance/cec-compliance.h')
-rw-r--r--utils/cec-compliance/cec-compliance.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index f50ea483..c601427e 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -8,10 +8,8 @@
#ifndef _CEC_COMPLIANCE_H_
#define _CEC_COMPLIANCE_H_
-#include <stdarg.h>
-#include <cerrno>
#include <string>
-#include <time.h>
+
#include <linux/cec-funcs.h>
#include "cec-htng-funcs.h"
@@ -228,7 +226,7 @@ struct remote_subtest {
show_colors ? COLOR_BOLD("warn") : "warn", \
__FILE__, __LINE__, ##args); \
if (exit_on_warn) \
- exit(1); \
+ std::exit(EXIT_FAILURE); \
0; \
})
@@ -259,7 +257,7 @@ struct remote_subtest {
printf("\t\t%s: %s(%d): " fmt, show_colors ? \
COLOR_RED("fail") : "fail", __FILE__, __LINE__, ##args); \
if (exit_on_fail) \
- exit(1); \
+ std::exit(EXIT_FAILURE); \
FAIL; \
})

Privacy Policy