[PHP-DEV] CVS update: php3 From: rasmus (php-dev <email protected>)
Date: 02/28/99

Date: Sunday February 28, 1999 @ 12:31
Author: rasmus

Update of /repository/php3
In directory asf:/u/temp/cvs-serv2514

Modified Files:
        alloc.c
Log Message:
I must be on drugs. Why didn't I just cast it?
Promoting it to an unsigned long should always be safe.

Index: php3/alloc.c
diff -c php3/alloc.c:1.82 php3/alloc.c:1.83
*** php3/alloc.c:1.82 Sun Feb 28 12:23:49 1999
--- php3/alloc.c Sun Feb 28 12:31:21 1999
***************
*** 463,470 ****
                                  *((long *)(((char *) p) + sizeof(mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
                  fprintf(stderr,"%10s\t","");
                  if (overflows>=sizeof(long)) {
! unsigned long format_hack = (unsigned long)sizeof(long);
! fprintf(stderr, "At least %lu bytes overflown\n", format_hack);
                  } else {
                          fprintf(stderr, "%d byte(s) overflown\n", overflows);
                  }
--- 463,469 ----
                                  *((long *)(((char *) p) + sizeof(mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
                  fprintf(stderr,"%10s\t","");
                  if (overflows>=sizeof(long)) {
! fprintf(stderr, "At least %lu bytes overflown\n", (unsigned long)sizeof(long));
                  } else {
                          fprintf(stderr, "%d byte(s) overflown\n", overflows);
                  }

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>