avoid side effects in assert()

closes #434

Change-Id: I6aad7ccb556453650d80cf588ae80daf98d3369d
pull/432/merge
Richard Fuchs 7 years ago
parent 8733875b36
commit c17f4fe53d

@ -183,7 +183,8 @@ INLINE int strmemcmp(const void *mem, int len, const char *str) {
}
INLINE void random_string(unsigned char *buf, int len) {
assert(RAND_bytes(buf, len) == 1);
int ret = RAND_bytes(buf, len);
assert(ret == 1);
}
INLINE long unsigned int ssl_random() {
long unsigned int ret;

@ -126,7 +126,8 @@ static void control_ng_incoming(struct obj *obj, str *buf, const endpoint_t *sin
return;
}
assert( bencode_buffer_init(&bencbuf) == 0 );
int ret = bencode_buffer_init(&bencbuf);
assert(ret == 0);
resp = bencode_dictionary(&bencbuf);
assert(resp != NULL);

Loading…
Cancel
Save