mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-07 14:24:14 +01:00
fixed some Bool flags passed to WINgs functions to always set 1 or 0 values internally
This commit is contained in:
@@ -925,6 +925,8 @@ WMSetConnectionNonBlocking(WMConnection *cPtr, Bool flag)
|
||||
{
|
||||
wassertrv(cPtr!=NULL && cPtr->sock>=0, False);
|
||||
|
||||
flag = ((flag==0) ? 0 : 1);
|
||||
|
||||
if (cPtr->isNonBlocking == flag)
|
||||
return True;
|
||||
|
||||
@@ -942,7 +944,7 @@ WMSetConnectionCloseOnExec(WMConnection *cPtr, Bool flag)
|
||||
{
|
||||
wassertrv(cPtr!=NULL && cPtr->sock>=0, False);
|
||||
|
||||
if (fcntl(cPtr->sock, F_SETFD, (flag ? FD_CLOEXEC : 0)) < 0) {
|
||||
if (fcntl(cPtr->sock, F_SETFD, ((flag==0) ? 0 : FD_CLOEXEC)) < 0) {
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user