diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 21:35:20 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 21:35:26 +0530 |
commit | f742dcd82123f180d04b5282402c3e06d3e8a3d1 (patch) | |
tree | 7f3acbca8eb10b2069d1ebfce6c44db108499c96 /src/libnpass/gpg.c | |
parent | 0a5cf111b39710579dcdac609c9c1af6a1d19a69 (diff) |
c: wrap multi line macros inside do while
https://man.openbsd.org/style
Diffstat (limited to 'src/libnpass/gpg.c')
-rw-r--r-- | src/libnpass/gpg.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libnpass/gpg.c b/src/libnpass/gpg.c index f193363..a729028 100644 --- a/src/libnpass/gpg.c +++ b/src/libnpass/gpg.c @@ -9,11 +9,13 @@ #include "util.h" -#define gpg_err_ret(err) \ - if (err) { \ - gpg_cleanup(); \ - err_ret(1, "%s: %s", gpgme_strsource(err), gpgme_strerror(err)); \ - } +#define gpg_err_ret(err) do { \ + if (err) { \ + gpg_cleanup(); \ + err_ret(1, "%s: %s", \ + gpgme_strsource(err), gpgme_strerror(err)); \ + } \ +} while (0) static gpgme_ctx_t ctx = NULL; static gpgme_key_t key = NULL; |