]> granicus.if.org Git - php/commitdiff
map ell the err code
authorAnatol Belski <ab@php.net>
Thu, 18 Aug 2016 13:26:24 +0000 (15:26 +0200)
committerAnatol Belski <ab@php.net>
Thu, 18 Aug 2016 13:28:15 +0000 (15:28 +0200)
TSRM/tsrm_win32.c

index c080f17a7cec5890c64e3381edb123565ca6e715..fc5e58f2f4a0bd8cc448953e0d8357aae390fe2f 100644 (file)
@@ -729,10 +729,7 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
 
        err = GetLastError();
        if (err) {
-               /* Catch more errors */
-               if (ERROR_NOT_ENOUGH_MEMORY == err) {
-                       _set_errno(ENOMEM);
-               }
+               SET_ERRNO_FROM_WIN32_CODE(err);
                return (void*)-1;
        }