On 06/02/2023 05:46, Jim Meyering wrote:
I noticed a sporadic test failure when the bsd checksum happened to
have one or more leading zeros.
Compare these:

   $ src/cksum --raw --algorithm=bsd <<< 2|od --endian=big -An -w1024
-tu2|tr -d ' '
   35
   $ src/cksum --untagged --algorithm=bsd <<< 2
   00035     1

At first I thought I'd strip the excess zeros before comparing,
but thought it slightly better to zero-pad any too-narrow value.

The attached seems to do the job:

Oh nice one.
Merged that into the change and pushed.

thanks!
Pádraig

Reply via email to