Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
sha256_buf() has nothing relevant to return, make it void
Bryan Drewery committed 12 years ago
commit 6ede6957d30413866b43d938bd9581510bd87a33
parent 3ca6e5d
2 files changed +2 -4
modified libpkg/private/utils.h
@@ -84,7 +84,7 @@ int format_exec_cmd(char **, const char *, const char *, const char *, char *);
int is_dir(const char *);
int is_conf_file(const char *path, char *newpath, size_t len);

-
int sha256_buf(char *, size_t len, char[SHA256_DIGEST_LENGTH * 2 +1]);
+
void sha256_buf(char *, size_t len, char[SHA256_DIGEST_LENGTH * 2 +1]);
int sha256_file(const char *, char[SHA256_DIGEST_LENGTH * 2 +1]);
int sha256_fd(int fd, char[SHA256_DIGEST_LENGTH * 2 +1]);
int md5_file(const char *, char[MD5_DIGEST_LENGTH * 2 +1]);
modified libpkg/utils.c
@@ -355,7 +355,7 @@ sha256_file(const char *path, char out[SHA256_DIGEST_LENGTH * 2 + 1])
	return (ret);
}

-
int
+
void
sha256_buf(char *buf, size_t len, char out[SHA256_DIGEST_LENGTH * 2 + 1])
{
	unsigned char hash[SHA256_DIGEST_LENGTH];
@@ -367,8 +367,6 @@ sha256_buf(char *buf, size_t len, char out[SHA256_DIGEST_LENGTH * 2 + 1])
	SHA256_Update(&sha256, buf, len);
	SHA256_Final(hash, &sha256);
	sha256_hash(hash, out);
-

-
	return (EPKG_OK);
}

int