Skip to content

Commit 6429781

Browse files
committed
defer: make fmt
1 parent ede5ed8 commit 6429781

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

libtock-sync/crypto/hmac.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ returncode_t libtocksync_hmac_simple(libtock_hmac_algorithm_t hmac_type,
1313

1414
ret = libtock_hmac_set_readonly_allow_key_buffer(key_buffer, key_length);
1515
if (ret != RETURNCODE_SUCCESS) return ret;
16-
defer { libtock_hmac_set_readonly_allow_key_buffer(NULL, 0); };
16+
defer { libtock_hmac_set_readonly_allow_key_buffer(NULL, 0);
17+
};
1718

1819
ret = libtock_hmac_set_readonly_allow_data_buffer(input_buffer, input_length);
1920
if (ret != RETURNCODE_SUCCESS) return ret;
20-
defer { libtock_hmac_set_readonly_allow_data_buffer(NULL, 0); };
21+
defer { libtock_hmac_set_readonly_allow_data_buffer(NULL, 0);
22+
};
2123

2224
ret = libtock_hmac_set_readwrite_allow_destination_buffer(hmac_buffer, hmac_length);
2325
if (ret != RETURNCODE_SUCCESS) return ret;
24-
defer { libtock_hmac_set_readwrite_allow_destination_buffer(NULL, 0); };
26+
defer { libtock_hmac_set_readwrite_allow_destination_buffer(NULL, 0);
27+
};
2528

2629
ret = libtock_hmac_command_run();
2730
if (ret != RETURNCODE_SUCCESS) return ret;

libtock/defer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ extern "C" {
55
#endif
66

77
#define __DEFER__(F, V) \
8-
auto void F(int* V ## SENTINEL); \
8+
auto void F(int* V##SENTINEL); \
99
[[gnu::cleanup(F)]] int V; \
10-
auto void F(__attribute__ ((unused)) int* V ## SENTINEL)
10+
auto void F(__attribute__ ((unused)) int* V##SENTINEL)
1111

1212
#define defer __DEFER(__COUNTER__)
1313
#define __DEFER(N) __DEFER_(N)
14-
#define __DEFER_(N) __DEFER__(__DEFER_FUNCTION_ ## N, __DEFER_VARIABLE_ ## N)
14+
#define __DEFER_(N) __DEFER__(__DEFER_FUNCTION_##N, __DEFER_VARIABLE_##N)
1515

1616
#ifdef __cplusplus
1717
}

0 commit comments

Comments
 (0)