projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20e6d99
)
winpr: _IoCreateDeviceEx: fix mkdir error check
author
Mike Gilbert
<floppym@gentoo.org>
Mon, 30 Oct 2017 00:26:53 +0000
(20:26 -0400)
committer
Mike Gilbert
<floppym@gentoo.org>
Mon, 30 Oct 2017 15:59:35 +0000
(11:59 -0400)
The mkdir(2) function returns 0 on success, and -1 on error.
This resolves an error in TestIoDevice when /tmp/.device/ does not
exist.
Bug: https://bugs.gentoo.org/635838
winpr/libwinpr/io/device.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/io/device.c
b/winpr/libwinpr/io/device.c
index
0e13092
..
2a1b7f8
100644
(file)
--- a/
winpr/libwinpr/io/device.c
+++ b/
winpr/libwinpr/io/device.c
@@
-138,7
+138,7
@@
NTSTATUS _IoCreateDeviceEx(PDRIVER_OBJECT_EX DriverObject, ULONG DeviceExtension
if (!PathFileExistsA(DeviceBasePath))
{
- if (
!mkdir(DeviceBasePath, S_IRUSR | S_IWUSR | S_IXUSR)
)
+ if (
mkdir(DeviceBasePath, S_IRUSR | S_IWUSR | S_IXUSR) != 0
)
{
free(DeviceBasePath);
return STATUS_ACCESS_DENIED;