diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2007-01-31 00:15:06 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2007-01-31 00:15:06 +0000 |
| commit | eece353fe80cc9a20337c67d88be6924eb407823 (patch) | |
| tree | 97d79e5a68a0b534da4d96671a10c49f5d19e379 /ext | |
| parent | 5f8256cfc1f314d7e9c04c6459a7f0c611cf9eb9 (diff) | |
| download | php-git-eece353fe80cc9a20337c67d88be6924eb407823.tar.gz | |
Minor code optimization
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/shmop/shmop.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 5ee2ca266f..ebd5082c8d 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -244,11 +244,7 @@ PHP_FUNCTION(shmop_read) 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); } /* }}} */ |
