cvs: php4 /ext/sysvshm sysvshm.c

From: Date: Mon, 18 Dec 2000 12:22:29 +0000
Subject: cvs: php4 /ext/sysvshm sysvshm.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3198@lists.php.net to get a copy of this message
hholzgra Mon Dec 18 04:22:29 2000 EDT Modified files: /php4/ext/sysvshm sysvshm.c Log: fixed BUG #8306: shmat() returns -1 on errors, not NULL Index: php4/ext/sysvshm/sysvshm.c diff -u php4/ext/sysvshm/sysvshm.c:1.34 php4/ext/sysvshm/sysvshm.c:1.35 --- php4/ext/sysvshm/sysvshm.c:1.34 Mon Oct 30 09:18:39 2000 +++ php4/ext/sysvshm/sysvshm.c Mon Dec 18 04:22:28 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvshm.c,v 1.34 2000/10/30 17:18:39 stas Exp $ */ +/* $Id: sysvshm.c,v 1.35 2000/12/18 12:22:28 hholzgra Exp $ */ /* This has been built and tested on Solaris 2.6. * It may not compile or execute correctly on other systems. @@ -125,7 +125,7 @@ } } - if((shm_ptr = shmat(shm_id,NULL,0))==NULL) { + if((shm_ptr = shmat(shm_id,NULL,0))==(void *)-1) { php_error(E_WARNING, "shmget() failed for key 0x%x: %s", shm_key, strerror(errno)); RETURN_FALSE; }

« previous php.cvs (#3198) next »