secp256k1_context_create: Use unsigned type for flags bitfield

This commit is contained in:
Luke Dashjr 2015-09-01 01:40:38 +00:00
parent 85e3a2cc08
commit 64b730bc3f
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ typedef int (*secp256k1_nonce_function_t)(
* In: flags: which parts of the context to initialize. * In: flags: which parts of the context to initialize.
*/ */
secp256k1_context_t* secp256k1_context_create( secp256k1_context_t* secp256k1_context_create(
int flags unsigned int flags
) SECP256K1_WARN_UNUSED_RESULT; ) SECP256K1_WARN_UNUSED_RESULT;
/** Copies a secp256k1 context object. /** Copies a secp256k1 context object.

View File

@ -57,7 +57,7 @@ struct secp256k1_context_struct {
callback_t error_callback; callback_t error_callback;
}; };
secp256k1_context_t* secp256k1_context_create(int flags) { secp256k1_context_t* secp256k1_context_create(unsigned int flags) {
secp256k1_context_t* ret = (secp256k1_context_t*)checked_malloc(&default_error_callback, sizeof(secp256k1_context_t)); secp256k1_context_t* ret = (secp256k1_context_t*)checked_malloc(&default_error_callback, sizeof(secp256k1_context_t));
ret->illegal_callback = default_illegal_callback; ret->illegal_callback = default_illegal_callback;
ret->error_callback = default_error_callback; ret->error_callback = default_error_callback;