Skip to content
Snippets Groups Projects
Commit 45020358 authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

Right-shift a signed integer doesn't clear high bit.

Just use unsigned.
parent b2e8fef4
No related merge requests found
......@@ -117,7 +117,7 @@ void eb_device_flush(eb_device_t devicep) {
eb_operation_t operationp;
eb_operation_t scanp;
int needs_check;
int ops, maxops;
unsigned int ops, maxops;
cycle = EB_CYCLE(cyclep);
nextp = cycle->next;
......@@ -163,10 +163,7 @@ void eb_device_flush(eb_device_t devicep) {
if (needs_check) {
maxops = stride * 8;
} else {
/* windows doesn't have INT_MAX */
maxops = 0;
maxops = ~maxops;
maxops >>= 1;
maxops = -1;
}
/* Begin formatting the packet into records */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment