diff options
author | Tormod Volden <debian.tormod@gmail.com> | 2012-05-09 23:48:06 +0200 |
---|---|---|
committer | Tormod Volden <debian.tormod@gmail.com> | 2012-05-20 21:50:14 +0200 |
commit | 25cfa8a48c0d130883b774b91286ad1796b3a313 (patch) | |
tree | e8806802a33166a970c7ec6a7e492b958a0d9347 | |
parent | 7a441035e2aac4d76dcd4cb548e0b9e1d9eea8ba (diff) |
fixup: duoview 2: remove extra variable, no risk of side effects anyway
-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 |