|
Message-ID: <20230106093142.GB2032@voyager> Date: Fri, 6 Jan 2023 10:31:42 +0100 From: Markus Wichmann <nullplan@....net> To: musl@...ts.openwall.com Subject: Re: [PATCH] fix return value of wcs{,n}cmp for near-limits signed wchar_t values On Fri, Jan 06, 2023 at 10:20:10AM +0100, Markus Wichmann wrote: > return ((int64_t)*l - *r) >> 1; Wait, disregard that suggestion. It doesn't work when the difference comes out at 1. Works for all other values, but if the difference is 1, the shift makes it 0, and that means something different for these functions. Ciao, Markus
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.