# HG changeset patch # User michael # Date 1153390927 0 # Node ID 5a743f6f836a1bce7bb85c926805c68c679e58ad # Parent 5b04d98e11bbeb292e00e5f050fe05acc0f5c651 fix regression failure after adler simplification diff -r 5b04d98e11bb -r 5a743f6f836a aviobuf.c --- a/aviobuf.c Wed Jul 19 09:38:22 2006 +0000 +++ b/aviobuf.c Thu Jul 20 10:22:07 2006 +0000 @@ -298,7 +298,7 @@ void init_checksum(ByteIOContext *s, unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum){ s->update_checksum= update_checksum; if(s->update_checksum){ - s->checksum= s->update_checksum(checksum, NULL, 0); + s->checksum= checksum; s->checksum_ptr= s->buf_ptr; } } diff -r 5b04d98e11bb -r 5a743f6f836a nut.c --- a/nut.c Wed Jul 19 09:38:22 2006 +0000 +++ b/nut.c Thu Jul 20 10:22:07 2006 +0000 @@ -331,7 +331,7 @@ size= get_v(bc); - init_checksum(bc, calculate_checksum ? av_adler32_update : NULL, 0); + init_checksum(bc, calculate_checksum ? av_adler32_update : NULL, 1); nut->packet_start[2] = start; nut->written_packet_size= size; @@ -476,7 +476,7 @@ put_v(bc, nut->written_packet_size); /* forward ptr */ if(calculate_checksum) - init_checksum(bc, av_adler32_update, 0); + init_checksum(bc, av_adler32_update, 1); return 0; }