/*
* Copyright (c) 2003 Roland McGrath <roland@redhat.com>
+ * Copyright (c) 2003-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
# define IPC_64 0x100
#endif
-#define PRINTCTL(flagset, arg, dflt) \
- if ((arg) & IPC_64) tprints("IPC_64|"); \
- printxval((flagset), (arg) &~ IPC_64, dflt)
+#define PRINTCTL(flagset, arg, dflt) \
+ do { \
+ if ((arg) & IPC_64) { \
+ print_xlat(IPC_64); \
+ tprints("|"); \
+ } \
+ printxval((flagset), (arg) & ~IPC_64, dflt); \
+ } while (0)
-#endif /* #ifndef STRACE_IPC_DEFS_H */
+#endif /* !STRACE_IPC_DEFS_H */