diff --git a/src/fsort.c b/src/fsort.c index 10f8b165fb5011ab56558d849eb9998b54e15d79..e20c654f411cb362fa14fd7adc50a5e74df91ea0 100644 --- a/src/fsort.c +++ b/src/fsort.c @@ -88,7 +88,7 @@ void fsort(void *base, #ifdef HANDLES_UNALIGNED_MEMORY_ACCESS switch(elmSize) #else - switch( (((unsigned long)base) % elmSize) ? size : 0 ) + switch( (((unsigned long)base) % elmSize) ? 0 : size ) #endif { case 1: fsort_1(( B1_T *)base,(elms-1)+( B1_T *)base); break; diff --git a/src/pike_memory.c b/src/pike_memory.c index de2f2f148403534d46d9c50275d4b8f26630ecfd..416e4e011a06ece0fb3fc095a86a96808904ab14 100644 --- a/src/pike_memory.c +++ b/src/pike_memory.c @@ -58,7 +58,7 @@ void reverse(char *memory, INT32 nitems, INT32 size) #ifdef HANDLES_UNALIGNED_MEMORY_ACCESS switch(size) #else - switch( (((unsigned long)memory) % size) ? size : 0 ) + switch( (((unsigned long)memory) % size) ? 0 : size) #endif { DOSIZE(1,B1_T) @@ -115,7 +115,7 @@ void reorder(char *memory, INT32 nitems, INT32 size,INT32 *order) #ifdef HANDLES_UNALIGNED_MEMORY_ACCESS switch(size) #else - switch( (((unsigned long)memory) % size) ? size : 0 ) + switch( (((unsigned long)memory) % size) ? 0 : size ) #endif { DOSIZE(1,B1_T)