Skip to content

Commit

Permalink
Unify error handling in include/tst_safe_posix_ipc.h
Browse files Browse the repository at this point in the history
- Properly format caller file:line location

Signed-off-by: Martin Doucha <[email protected]>
Reviewed-by: Cyril Hrubis <[email protected]>
  • Loading branch information
mdoucha authored and metan-ucw committed Nov 6, 2020
1 parent 7e0c9ad commit a160453
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/tst_safe_posix_ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ static inline int safe_mq_open(const char *file, const int lineno,
va_end(ap);

rval = mq_open(pathname, oflags, mode, attr);

if (rval == -1) {
tst_brk(TBROK | TERRNO, "%s:%d: mq_open(%s,%d,0%o,%p) failed",
file, lineno, pathname, oflags, mode, attr);
tst_brk_(file, lineno, TBROK | TERRNO,
"mq_open(%s,%d,%04o,%p) failed", pathname, oflags,
mode, attr);
}

return rval;
Expand Down

0 comments on commit a160453

Please sign in to comment.