ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/utils.C
(Generate patch)

Comparing deliantra/server/common/utils.C (file contents):
Revision 1.70 by root, Fri Jan 25 18:09:23 2008 UTC vs.
Revision 1.71 by root, Fri Feb 1 15:54:07 2008 UTC

521 { 521 {
522 //fprintf (stderr, "g_slice_free %ld %p\n", size, ptr);//D 522 //fprintf (stderr, "g_slice_free %ld %p\n", size, ptr);//D
523 unsigned long *p = (unsigned long *)ptr; 523 unsigned long *p = (unsigned long *)ptr;
524 unsigned long s = *--p ^ MAGIC; 524 unsigned long s = *--p ^ MAGIC;
525 525
526 if ((*p ^ MAGIC) != size) 526 if (size != (unsigned long)(*p ^ MAGIC))
527 LOG (logBacktrace | llevError, "slice free size (%lx) doesn't match alloc size (%lx)\n", size, s); 527 LOG (logBacktrace | llevError, "slice free size (%lx) doesn't match alloc size (%lx)\n", size, s);
528 528
529 *p = MAGIC; 529 *p = MAGIC;
530 530
531 (g_slice_free1)(s + sizeof (unsigned long), p); 531 (g_slice_free1)(s + sizeof (unsigned long), p);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines