Changeset 2193905 for lib/data-struct/buckets.c
- Timestamp:
- 11/29/18 10:12:59 (2 years ago)
- Branches:
- develop
- Children:
- fdf23b8
- Parents:
- d74ca03
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/data-struct/buckets.c
r88b9798 r2193905 26 26 27 27 #include <stdlib.h> 28 #include <assert.h>29 28 #include <string.h> 30 29 #include "buckets.h" … … 183 182 libtrace_bucket_node_t tmp; 184 183 185 /*assert(id != 0);*/186 184 if (id == 0) { 187 185 fprintf(stderr, "bucket ID cannot be 0 in libtrace_release_bucket_id()\n"); … … 191 189 pthread_mutex_lock(&b->lock); 192 190 bnode = b->packets[id]; 193 /*assert(bnode != NULL);*/ 194 if (bnode == NULL) { 191 if (!bnode) { 195 192 fprintf(stderr, "bucket ID %lu is NULL in libtrace_release_bucket_id()\n", id); 196 193 return; … … 204 201 s = id - bnode->startindex; 205 202 } 206 /*assert(s < bnode->slots);*/207 203 if (s >= bnode->slots) { 208 204 fprintf(stderr, "Error in libtrace_release_bucket_id()\n"); 209 205 return; 210 206 } 211 /*assert(bnode->released[s] != 0);*/212 207 if (bnode->released[s] == 0) { 213 208 fprintf(stderr, "Error in libtrace_release_bucket_id()\n"); … … 244 239 break; 245 240 246 /*assert(lnode->next != NULL);*/ 247 if (lnode->next == NULL) { 241 if (!lnode->next) { 248 242 fprintf(stderr, "Error in libtrace_release_bucket_id()\n"); 249 243 return;
Note: See TracChangeset
for help on using the changeset viewer.