iliaa Wed Jan 31 00:15:07 2007 UTC Modified files: /php-src/ext/shmop shmop.c Log: Minor code optimization http://cvs.php.net/viewvc.cgi/php-src/ext/shmop/shmop.c?r1=1.38&r2=1.39&diff_format=u Index: php-src/ext/shmop/shmop.c diff -u php-src/ext/shmop/shmop.c:1.38 php-src/ext/shmop/shmop.c:1.39 --- php-src/ext/shmop/shmop.c:1.38 Mon Jan 1 09:29:29 2007 +++ php-src/ext/shmop/shmop.c Wed Jan 31 00:15:06 2007 @@ -16,7 +16,7 @@ | Ilia Alshanetsky <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: shmop.c,v 1.38 2007/01/01 09:29:29 sebastian Exp $ */ +/* $Id: shmop.c,v 1.39 2007/01/31 00:15:06 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -244,11 +244,7 @@ startaddr = shmop->addr + start; bytes = count ? count : shmop->size - start; - return_string = emalloc(bytes+1); - memcpy(return_string, startaddr, bytes); - return_string[bytes] = 0; - - RETURN_STRINGL(return_string, bytes, 0); + RETURN_STRINGL(startaddr, bytes, 1); } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php