51
51
} \
52
52
} while(0)
53
53
54
- #define ARG_CHECK_NO_RETURN (cond ) do { \
54
+ #define ARG_CHECK_VOID (cond ) do { \
55
55
if (EXPECT(!(cond), 0)) { \
56
56
secp256k1_callback_call(&ctx->illegal_callback, #cond); \
57
+ return; \
57
58
} \
58
59
} while(0)
59
60
@@ -166,7 +167,7 @@ secp256k1_context* secp256k1_context_clone(const secp256k1_context* ctx) {
166
167
}
167
168
168
169
void secp256k1_context_preallocated_destroy (secp256k1_context * ctx ) {
169
- ARG_CHECK_NO_RETURN (ctx != secp256k1_context_static );
170
+ ARG_CHECK_VOID (ctx != secp256k1_context_static );
170
171
if (ctx != NULL ) {
171
172
secp256k1_ecmult_gen_context_clear (& ctx -> ecmult_gen_ctx );
172
173
}
@@ -183,7 +184,7 @@ void secp256k1_context_set_illegal_callback(secp256k1_context* ctx, void (*fun)(
183
184
/* We compare pointers instead of checking secp256k1_context_is_proper() here
184
185
because setting callbacks is allowed on *copies* of the static context:
185
186
it's harmless and makes testing easier. */
186
- ARG_CHECK_NO_RETURN (ctx != secp256k1_context_static );
187
+ ARG_CHECK_VOID (ctx != secp256k1_context_static );
187
188
if (fun == NULL ) {
188
189
fun = secp256k1_default_illegal_callback_fn ;
189
190
}
@@ -195,7 +196,7 @@ void secp256k1_context_set_error_callback(secp256k1_context* ctx, void (*fun)(co
195
196
/* We compare pointers instead of checking secp256k1_context_is_proper() here
196
197
because setting callbacks is allowed on *copies* of the static context:
197
198
it's harmless and makes testing easier. */
198
- ARG_CHECK_NO_RETURN (ctx != secp256k1_context_static );
199
+ ARG_CHECK_VOID (ctx != secp256k1_context_static );
199
200
if (fun == NULL ) {
200
201
fun = secp256k1_default_error_callback_fn ;
201
202
}
0 commit comments