summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crypt.h8
-rw-r--r--shopify.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/crypt.h b/crypt.h
index 5efe114..57d4689 100644
--- a/crypt.h
+++ b/crypt.h
@@ -24,12 +24,12 @@ static inline bool crypt_maccmp(const char *key, const char *query,
return !strcmp(hmac, hmacsha256_str);
}
-static inline void crypt_getnonce(char *string, const size_t string_len)
+static inline void crypt_getnonce(char buf[], const size_t buf_len)
{
- string[0] = '\0';
- const size_t nonce_len = string_len / 2;
+ buf[0] = '\0';
+ const size_t nonce_len = buf_len / 2;
unsigned char nonce[nonce_len + 1];
gcry_create_nonce(nonce, nonce_len);
for (int i = 0; i < nonce_len; i++)
- sprintf(string, "%s%02x", string, nonce[i]);
+ sprintf(buf, "%s%02x", buf, nonce[i]);
}
diff --git a/shopify.c b/shopify.c
index a718ecf..653c11e 100644
--- a/shopify.c
+++ b/shopify.c
@@ -43,7 +43,7 @@
extern inline void crypt_init();
extern inline bool crypt_maccmp(const char *, const char *, const char *);
-extern inline void crypt_getnonce(char *, const size_t);
+extern inline void crypt_getnonce(char [], const size_t);
extern inline bool regex_match(const char *);
extern inline void base64_decode(unsigned char *, char **);
extern inline void config_getscopes(const char *, char **);