mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
miracle-dispd: replace assert() with assert_?ret?()
for capturing more information about buggy behaviours, more
validations and loggings are added
Change-Id: I57e11d201324ed10b2218c9e72627759aae619c9
This commit is contained in:
parent
875fa86f6b
commit
d8d85c1b97
5 changed files with 145 additions and 89 deletions
|
|
@ -236,4 +236,13 @@ extern const char *LOG_SUBSYSTEM;
|
|||
#define log_vEUNMANAGED() \
|
||||
((void)log_EUNMANAGED())
|
||||
|
||||
#define assert_ret(c) \
|
||||
if(!(c)) return (log_error("assertion " #c " failed"), -EINVAL)
|
||||
|
||||
#define assert_retv(c, v) \
|
||||
if(!(c)) return (log_error("assertion " #c " failed"), (v))
|
||||
|
||||
#define assert_vret(c) \
|
||||
if(!(c)) { log_error("assertion " #c " failed"); return; }
|
||||
|
||||
#endif /* SHL_LOG_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue