Browse Source

avoid side effects in assert()

closes #434

Change-Id: I6aad7ccb556453650d80cf588ae80daf98d3369d
pull/432/merge
Richard Fuchs 8 years ago
parent
commit
c17f4fe53d
2 changed files with 4 additions and 2 deletions
  1. +2
    -1
      daemon/aux.h
  2. +2
    -1
      daemon/control_ng.c

+ 2
- 1
daemon/aux.h View File

@ -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;


+ 2
- 1
daemon/control_ng.c View File

@ -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