From 64b730bc3fa98f4fde23d4a876e7ec7f82febf64 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 1 Sep 2015 01:40:38 +0000 Subject: [PATCH] secp256k1_context_create: Use unsigned type for flags bitfield --- include/secp256k1.h | 2 +- src/secp256k1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/secp256k1.h b/include/secp256k1.h index a287f894..de6a479e 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -141,7 +141,7 @@ typedef int (*secp256k1_nonce_function_t)( * In: flags: which parts of the context to initialize. */ secp256k1_context_t* secp256k1_context_create( - int flags + unsigned int flags ) SECP256K1_WARN_UNUSED_RESULT; /** Copies a secp256k1 context object. diff --git a/src/secp256k1.c b/src/secp256k1.c index dbe97d05..3baaddae 100644 --- a/src/secp256k1.c +++ b/src/secp256k1.c @@ -57,7 +57,7 @@ struct secp256k1_context_struct { 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)); ret->illegal_callback = default_illegal_callback; ret->error_callback = default_error_callback;