Changeset 437
- Timestamp:
- 07/11/2005 10:58:27 AM (3 years ago)
- Files:
-
- 1 modified
-
branches/lighttpd-1.3.x/src/buffer.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/lighttpd-1.3.x/src/buffer.c
r425 r437 518 518 if (a->used == 0) return 1; 519 519 520 for (i = a->used - 1; i < a->used && i % (sizeof(size_t)); i --) { 520 /* we are unsigned, if i < 0 it will flip to MAX_SIZE_T and will be > a->used */ 521 for (i = a->used - 1; i < a->used && i % (sizeof(size_t)); i--) { 521 522 if (a->ptr[i] != b->ptr[i]) return 0; 522 523 } 524 525 /* compare the single char itself which was kicked us out of the loop */ 526 if (i < a->used && a->ptr[i] != b->ptr[i]) return 0; 523 527 524 528 for (i -= (sizeof(size_t)); i < a->used; i -= (sizeof(size_t))) { … … 526 530 *((size_t *)(b->ptr + i))) return 0; 527 531 } 528 532 529 533 return 1; 530 534 }

