Skip to content

Commit 8a77651

Browse files
libsocketcan: add proper no-ops for perror() and fprintf()
1 parent 51ecaf6 commit 8a77651

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libsocketcan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242

4343
/* Define DISABLE_ERROR_LOG to disable printing of error messages to stderr. */
4444
#ifdef DISABLE_ERROR_LOG
45-
#define perror(x)
46-
#define fprintf(...)
45+
#define perror(x) while (0) { perror(x); }
46+
#define fprintf(stream, format, args...) while (0) { fprintf(stream, format, ##args); }
4747
#endif
4848

4949
#define parse_rtattr_nested(tb, max, rta) \

0 commit comments

Comments
 (0)