diff options
author | Paul Selkirk <paul@psgd.org> | 2016-07-08 00:29:04 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2016-07-08 00:29:04 -0400 |
commit | 5780334a373ce55eb9ce977df185234844ac1924 (patch) | |
tree | e4b7ec5e21cdda257a94b1996b1828da81b46796 | |
parent | ec8b12c7e7c0544c9770b626ee263e58ada9a15d (diff) |
Don't reuse local variable in check() macro.
-rw-r--r-- | rpc_server.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rpc_server.c b/rpc_server.c index 7f6a5f6..a0de42d 100644 --- a/rpc_server.c +++ b/rpc_server.c @@ -40,7 +40,7 @@ * RPC calls. */ -#define check(op) if ((ret = (op)) != HAL_OK) return ret; +#define check(op) do { hal_error_t _err = (op); if (_err != HAL_OK) return _err; } while (0) #define pad(n) (((n) + 3) & ~3) @@ -497,7 +497,6 @@ static hal_error_t pkey_get_public_key_len(const uint8_t **iptr, const uint8_t * hal_client_handle_t client __attribute__((unused)); hal_pkey_handle_t pkey; size_t len; - hal_error_t ret; check(hal_xdr_decode_int(iptr, ilimit, &client.handle)); check(hal_xdr_decode_int(iptr, ilimit, &pkey.handle)); |