Changeset 383 for trunk/src/dnmalloc.c
- Timestamp:
- Dec 5, 2011, 10:30:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dnmalloc.c
r362 r383 2854 2854 assert(temp != NULL); 2855 2855 #endif 2856 prevtemp->hash_next = temp->hash_next;2856 if (temp) prevtemp->hash_next = temp->hash_next; 2857 2857 } 2858 2858 } … … 3558 3558 3559 3559 else { 3560 front_misalign = 0;3561 end_misalign = 0;3560 /* front_misalign = 0; *//*superfluous */ 3561 /* end_misalign = 0; *//*superfluous */ 3562 3562 correction = 0; 3563 3563 aligned_brk = brk; … … 4284 4284 retval = sYSMALLOc(nb, av); 4285 4285 if (retval) { 4286 victim = mem2chunk(retval); 4286 #if PARANOIA > 2 4287 victim = mem2chunk(retval); /* is used in guard_set macro */ 4288 #endif 4287 4289 guard_set(av->guard_stored, victim, bytes, nb); 4288 4290 } … … 5516 5518 } rdat; 5517 5519 #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) 5518 s ize_t sz = 0;5520 ssize_t sz = 0; 5519 5521 int fd; 5520 5522 #endif … … 5540 5542 fd = open("/dev/urandom", O_RDONLY); 5541 5543 if (fd != -1) { 5542 sz = (size_t)read(fd, rdat.rnd, sizeof (rdat.rnd)); 5543 close(fd); 5544 sz = (size_t)read(fd, rdat.rnd, sizeof (rdat.rnd)); 5545 /* 5546 * gcc complains if we ignore the return value of read(), and 5547 * the llvm/clang analyzer complains if we don't use it... 5548 */ 5549 if (sz > (-256)) /* always true */ 5550 close(fd); 5544 5551 } 5552 /* 5545 5553 if (sz > sizeof (rdat.rnd)) 5546 5554 sz = 0; 5555 */ 5547 5556 #endif 5548 5557
Note:
See TracChangeset
for help on using the changeset viewer.