summaryrefslogtreecommitdiff
path: root/backend/hpsj5s.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-02-02 17:14:32 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-02-02 17:14:32 +0100
commit5dadc28ea784db1ba1f56c2ea8618d2db67af1c8 (patch)
tree808b2499b54563b3290f34d70d159b1024310873 /backend/hpsj5s.c
parent5bb4cf12855ec0151de15d6c5a2354ff08766957 (diff)
parent3dade5db2a37543f19f0967901d8d80a52a1e459 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'backend/hpsj5s.c')
-rw-r--r--backend/hpsj5s.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/backend/hpsj5s.c b/backend/hpsj5s.c
index 786a8d6..77fcc46 100644
--- a/backend/hpsj5s.c
+++ b/backend/hpsj5s.c
@@ -961,8 +961,7 @@ GetCalibration ()
{ /*WARNING!!! Deadlock possible! */
bTest = CallFunctionWithRetVal (0xB5);
}
- while ((((bTest & 0x80) == 1) && ((bTest & 0x3F) <= 2)) ||
- (((bTest & 0x80) == 0) && ((bTest & 0x3F) >= 5)));
+ while ((bTest & 0x80) ? (bTest & 0x3F) <= 2 : (bTest & 0x3F) >= 5);
CallFunctionWithParameter (0xCD, 0);
/*Skip this line for ECP: */
@@ -1150,8 +1149,7 @@ CalibrateScanElements ()
usleep (1);
}
while ((timeout < 1000) &&
- ((((bTest & 0x80) == 1) && ((bTest & 0x3F) <= 2)) ||
- (((bTest & 0x80) == 0) && ((bTest & 0x3F) >= 5))));
+ ((bTest & 0x80) ? (bTest & 0x3F) <= 2 : (bTest & 0x3F) >= 5));
/*Let's read it... */
if(timeout < 1000)
@@ -1218,8 +1216,7 @@ CalibrateScanElements ()
usleep (1);
}
while ((timeout < 1000) &&
- ((((bTest & 0x80) == 1) && ((bTest & 0x3F) <= 2)) ||
- (((bTest & 0x80) == 0) && ((bTest & 0x3F) >= 5))));
+ ((bTest & 0x80) ? (bTest & 0x3F) <= 2 : (bTest & 0x3F) >= 5));
/*Let's read it... */
if(timeout < 1000)