|
From: | Matthew Woehlke |
Subject: | Re: [PATCH] df: Fix bug when totaling unknown values. |
Date: | Wed, 25 Mar 2009 17:15:02 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.21) Gecko/20090320 Fedora/2.0.0.21-1.fc10 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 |
Jim Meyering wrote:
Good timing. Matthew Woehlke recently reported failure of the df/total-verify test. Looking into it, we found that one of those values was UINTMAX_MAX - 1.
Oops, I saw what the patch was and assumed you (Jim) sent it. Sorry for the confusion, Paul! (...that would explain why you mentioned a different platform ;-).)
As Jim notes, AIX gives (unsigned)-2 (i.e. UINTMAX_MAX - 1), not (unsigned)-1 (UINTMAX_MAX), so the previous patch won't actually fix the problem on AIX.
Adjusting if (total != UINTMAX_MAX) to if (total < UINTMAX_MAX - 1) should suffice. -- Matthew Please do not quote my e-mail address unobfuscated in message bodies. -- "Yoda of Borg am I. Futile is resistance. Assimilate you, I will." -- from http://en.wikipedia.org/wiki/Wikipedia:Yet_more_Best_of_BJAODN
[Prev in Thread] | Current Thread | [Next in Thread] |