diff options
-rw-r--r-- | src/savage_vbe.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/savage_vbe.c b/src/savage_vbe.c index ded0857..c8bead2 100644 --- a/src/savage_vbe.c +++ b/src/savage_vbe.c @@ -346,10 +346,8 @@ int SavageCorrectDuoViewFlag(int iDevInfo, Bool bEnableActivate, */ Bool bDoEnable = FALSE; - int iNewDevInfo = iDevInfo; /* decision logic */ - /* only use iDevInfo here to avoid side effects on the return value */ if ((iDevInfo & TV_ACTIVE) && ((iDevInfo & CRT_ACTIVE) || (iDevInfo & LCD_ACTIVE))) bDoEnable = TRUE; @@ -357,15 +355,15 @@ int SavageCorrectDuoViewFlag(int iDevInfo, Bool bEnableActivate, /* action logic */ if (bDoEnable == TRUE) { if (bEnableActivate == TRUE) { - iNewDevInfo |= DUO_ON; + iDevInfo |= DUO_ON; } } else { /* bDoEnable == FALSE */ if (bEnableDeactivate == TRUE) { - iNewDevInfo &= ~DUO_ON; + iDevInfo &= ~DUO_ON; } } - return iNewDevInfo; + return iDevInfo; } void |