From 5780334a373ce55eb9ce977df185234844ac1924 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Fri, 8 Jul 2016 00:29:04 -0400 Subject: Don't reuse local variable in check() macro. --- rpc_server.c | 3 +-- 1 file changed, 1 insertion(+), 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)); -- cgit v1.2.3