mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Fix GH-9829: Bug in refactoring Windows shmat() function
`shm->addr` cannot be `NULL` here, so the whole check is completely pointless. Given that this is merely a clean-up and not an actual bug fix, we do without a NEWS entry. Closes GH-9873.
This commit is contained in:
parent
8dabbda8bc
commit
1e3915c8c7
1 changed files with 0 additions and 7 deletions
|
@ -691,13 +691,6 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
|||
}
|
||||
|
||||
shm->addr = shm->descriptor + sizeof(shm->descriptor);
|
||||
|
||||
if (NULL == shm->addr) {
|
||||
int err = GetLastError();
|
||||
SET_ERRNO_FROM_WIN32_CODE(err);
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
shm->descriptor->shm_atime = time(NULL);
|
||||
shm->descriptor->shm_lpid = getpid();
|
||||
shm->descriptor->shm_nattch++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue