Unverified Commit 2ffda4c4 by Christian Brauner Committed by GitHub

Merge pull request #3113 from jcfaracco/clang

utils: Fix wrong integer of a function parameter.
parents df788783 7c3d3976
......@@ -1660,7 +1660,8 @@ static bool prepend_lxc_header(char *path, const char *t, char *const argv[])
FILE *f;
int ret = -1;
#if HAVE_OPENSSL
int i, md_len = 0;
int i;
unsigned int md_len = 0;
unsigned char md_value[EVP_MAX_MD_SIZE];
char *tpath;
#endif
......
......@@ -333,7 +333,7 @@ again:
#ifdef HAVE_OPENSSL
#include <openssl/evp.h>
static int do_sha1_hash(const char *buf, int buflen, unsigned char *md_value, int *md_len)
static int do_sha1_hash(const char *buf, int buflen, unsigned char *md_value, unsigned int *md_len)
{
EVP_MD_CTX *mdctx;
const EVP_MD *md;
......@@ -353,7 +353,7 @@ static int do_sha1_hash(const char *buf, int buflen, unsigned char *md_value, in
return 0;
}
int sha1sum_file(char *fnam, unsigned char *digest, int *md_len)
int sha1sum_file(char *fnam, unsigned char *digest, unsigned int *md_len)
{
char *buf;
int ret;
......
......@@ -99,7 +99,7 @@ extern int wait_for_pid(pid_t pid);
extern int lxc_wait_for_pid_status(pid_t pid);
#if HAVE_OPENSSL
extern int sha1sum_file(char *fnam, unsigned char *md_value, int *md_len);
extern int sha1sum_file(char *fnam, unsigned char *md_value, unsigned int *md_len);
#endif
/* initialize rand with urandom */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment