linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* duplicated modulo
@ 2011-04-01  9:41 Nicolas Kaiser
  2011-04-01  9:50 ` Michal Nazarewicz
  2011-04-04  8:26 ` Hendrik Visage
  0 siblings, 2 replies; 7+ messages in thread
From: Nicolas Kaiser @ 2011-04-01  9:41 UTC (permalink / raw)
  To: linux-c-programming

I'm curious: a duplicated modulo operation can't possibly make
any difference, can it?

diff -u -p ./arch/powerpc/platforms/powermac/nvram.c /tmp/nothing/arch/powerpc/platforms/powermac/nvram.c
--- ./arch/powerpc/platforms/powermac/nvram.c	2011-03-31 09:52:41.674292401 +0200
+++ /tmp/nothing/arch/powerpc/platforms/powermac/nvram.c
@@ -246,7 +246,6 @@ static u32 core99_calc_adler(u8 *buffer)
 	high = 0;
 	for (cnt=0; cnt<(NVRAM_SIZE-CORE99_ADLER_START); cnt++) {
 		if ((cnt % 5000) == 0) {
-			high  %= 65521UL;
 			high %= 65521UL;
 		}
 		low += buffer[cnt];


Best regards,
Nicolas Kaiser

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-04  8:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01  9:41 duplicated modulo Nicolas Kaiser
2011-04-01  9:50 ` Michal Nazarewicz
2011-04-01 10:19   ` Nicolas Kaiser
2011-04-01  9:30     ` Bogdan Cristea
2011-04-01 10:28     ` Bastian Bloessl
2011-04-01 11:20     ` Michal Nazarewicz
2011-04-04  8:26 ` Hendrik Visage

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).