diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-01-04 19:18:34 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-01-04 18:18:34 +0000 |
commit | f19cd01ad56306e05145ff51fa392163405b8516 (patch) | |
tree | 5739d0f81cf93f8b91a6fd7e21ea884d74376f00 /libpam/pam_item.c | |
parent | 3c71b368dd52e6acd2e887a8b8317a223b3fce4e (diff) | |
download | pam-f19cd01ad56306e05145ff51fa392163405b8516.tar.gz pam-f19cd01ad56306e05145ff51fa392163405b8516.tar.bz2 pam-f19cd01ad56306e05145ff51fa392163405b8516.zip |
libpam: enclose function macros
Avoid potential dangling-else issues by wrapping macros inside a while
loop.
Diffstat (limited to 'libpam/pam_item.c')
-rw-r--r-- | libpam/pam_item.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpam/pam_item.c b/libpam/pam_item.c index a27c680b..ad736a4f 100644 --- a/libpam/pam_item.c +++ b/libpam/pam_item.c @@ -13,7 +13,7 @@ #include <syslog.h> #define TRY_SET(X, Y) \ -{ \ +do { \ if ((X) != (Y)) { \ char *_TMP_ = _pam_strdup(Y); \ if (_TMP_ == NULL && (Y) != NULL) \ @@ -21,7 +21,7 @@ free(X); \ (X) = _TMP_; \ } \ -} +} while(0) /* functions */ |