aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-22 08:28:53 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-22 08:28:53 +0000
commit3d7207f9c56808ce623c8cd6ba003ec3e7a0a556 (patch)
treec66fc8a2104038d8af6fb77fa1bd4cc51ff43d8e /config.c
parentMerge branch 'osc8' (diff)
parenterrno: don’t use ‘_errno’ as a variable name; _ are reserved for use as identifiers (diff)
Merge branch 'rename-_errno'
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/config.c b/config.c
index cee12a6c..c0b305cf 100644
--- a/config.c
+++ b/config.c
@@ -149,13 +149,13 @@ static_assert(ALEN(url_binding_action_map) == BIND_ACTION_URL_COUNT,
#define LOG_AND_NOTIFY_ERRNO(...) \
do { \
- int _errno = errno; \
+ int errno_copy = errno; \
LOG_ERRNO(__VA_ARGS__); \
int len = snprintf(NULL, 0, __VA_ARGS__); \
- int errno_len = snprintf(NULL, 0, ": %s", strerror(_errno)); \
+ int errno_len = snprintf(NULL, 0, ": %s", strerror(errno_copy)); \
char *text = xmalloc(len + errno_len + 1); \
snprintf(text, len + errno_len + 1, __VA_ARGS__); \
- snprintf(&text[len], errno_len + 1, ": %s", strerror(_errno)); \
+ snprintf(&text[len], errno_len + 1, ": %s", strerror(errno_copy)); \
struct user_notification notif = { \
.kind = USER_NOTIFICATION_ERROR, \
.text = text, \