cvs: php-src /ext/shmop shmop.c

From: Date: Wed, 31 Jan 2007 00:15:07 +0000
Subject: cvs: php-src /ext/shmop shmop.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42914@lists.php.net to get a copy of this message
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 <ilia@prohost.org> | +----------------------------------------------------------------------+ */ -/* $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); } /* }}} */

« previous php.cvs (#42914) next »