Skip to content

Commit

Permalink
Remove unnecessary return value check
Browse files Browse the repository at this point in the history
  • Loading branch information
aveenismail committed Jan 10, 2025
1 parent 0657a90 commit d0aba38
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions common/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ bool write_file(const uint8_t *buf, size_t buf_len, FILE *fp, format_t format) {
}
bio = BIO_push(b64, bio);

(void) BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL);
BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL);
if(BIO_write(bio, buf, buf_len) <= 0) {
BIO_free_all(bio);
return false;
Expand All @@ -705,10 +705,8 @@ bool write_file(const uint8_t *buf, size_t buf_len, FILE *fp, format_t format) {
BIO_free_all(bio);
return false;
}
if(BIO_get_mem_ptr(bio, &bufferPtr) != 1) {
BIO_free_all(bio);
return false;
}
BIO_get_mem_ptr(bio, &bufferPtr);

p = (uint8_t *) bufferPtr->data;
length = bufferPtr->length;
} else if (format == _hex) {
Expand Down

0 comments on commit d0aba38

Please sign in to comment.