Remove check for MD5_RELIABLE as md5 is reported to be reliable on macos according to Peter Hyman.

This commit is contained in:
Con Kolivas 2022-02-25 23:07:47 +11:00
parent 06b1c08228
commit bf11a54b99
2 changed files with 2 additions and 9 deletions

View file

@ -225,7 +225,7 @@ static bool get_magic(rzip_control *control, char *magic)
/* Whether this archive contains md5 data at the end or not */
md5 = magic[21];
if (md5 && MD5_RELIABLE) {
if (md5) {
if (md5 == 1)
control->flags |= FLAG_MD5;
else
@ -1222,8 +1222,7 @@ bool compress_file(rzip_control *control)
int fd_in = -1, fd_out = -1;
char header[MAGIC_LEN];
if (MD5_RELIABLE)
control->flags |= FLAG_MD5;
control->flags |= FLAG_MD5;
if (ENCRYPT)
if (unlikely(!get_hash(control, 1)))
return false;

View file

@ -170,12 +170,6 @@ typedef sem_t cksem_t;
#define mremap fake_mremap
#endif
#if defined(__APPLE__)
# define MD5_RELIABLE (0)
#else
# define MD5_RELIABLE (1)
#endif
#define bswap_32(x) \
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))