diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-02-22 17:04:00 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-02-22 16:04:00 +0000 |
commit | 5bd5ab8b167115104c361b3d417ed16059493a9c (patch) | |
tree | 0ced2bbf5abe7c3b396d5f8bcf49c8ee5e37edd5 /libpam/include | |
parent | e559de0cdd6134a4b87a79aab6928fb1e8c7194c (diff) | |
download | pam-5bd5ab8b167115104c361b3d417ed16059493a9c.tar.gz pam-5bd5ab8b167115104c361b3d417ed16059493a9c.tar.bz2 pam-5bd5ab8b167115104c361b3d417ed16059493a9c.zip |
libpam: enclose macro parameters
Diffstat (limited to 'libpam/include')
-rw-r--r-- | libpam/include/security/_pam_macros.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libpam/include/security/_pam_macros.h b/libpam/include/security/_pam_macros.h index cd42bf72..d01f51f5 100644 --- a/libpam/include/security/_pam_macros.h +++ b/libpam/include/security/_pam_macros.h @@ -34,7 +34,7 @@ do { \ PAM_DEPRECATED register char *xx_; \ register unsigned int i_ = 0; \ if ((xx_=(x))) \ - for (;i_<n; i_++) \ + for (;i_<(n); i_++) \ xx_[i_] = 0; \ } while (0) @@ -45,7 +45,7 @@ do { \ #define _pam_drop(X) \ do { \ free(X); \ - X=NULL; \ + (X)=NULL; \ } while (0) /* @@ -53,16 +53,16 @@ do { \ */ #define _pam_drop_reply(/* struct pam_response * */ reply, /* int */ replies) \ -do { \ - PAM_DEPRECATED int reply_i; \ - \ - for (reply_i=0; reply_i<replies; ++reply_i) { \ - if (reply[reply_i].resp) { \ - _pam_overwrite(reply[reply_i].resp); \ - free(reply[reply_i].resp); \ - } \ - } \ - free(reply); \ +do { \ + PAM_DEPRECATED int reply_i; \ + \ + for (reply_i=0; reply_i<(replies); ++reply_i) { \ + if ((reply)[reply_i].resp) { \ + _pam_overwrite((reply)[reply_i].resp); \ + free((reply)[reply_i].resp); \ + } \ + } \ + free(reply); \ } while (0) /* some debugging code */ |