6 Feb
2025
6 Feb
'25
12:19 p.m.
Rémi Bernon (@rbernon) commented about dlls/ntdll/unix/sync.c:
+ if ((cache->access & desired_access) != desired_access) + { + release_inproc_sync_obj( cache ); + return STATUS_ACCESS_DENIED; + } + + return STATUS_SUCCESS; +} + + +static NTSTATUS linux_release_semaphore_obj( int obj, ULONG count, ULONG *prev_count ) +{ + NTSTATUS ret; + + ret = ioctl( obj, NTSYNC_IOC_SEM_RELEASE, &count ); + if (ret < 0) ioctl returns an int, not a NTSTATUS, it's also not very much used, what about getting rid of it (here and elsewhere below):
```suggestion:-1+0 if (ioctl( obj, NTSYNC_IOC_SEM_RELEASE, &count ) < 0) ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7226#note_93876