Peter Memishian wrote: > > I'm not sure I understand what you're suggesting. > > > > Are you suggesting that I just drop this issue on the floor, and abandon > > the attempt to clean this up? > > I'm suggesting that we placate lint through whatever means necessary, but > keep the existing signature and semantics of the macros. When we have > more time, other things like having the macros check for malformed > messages could be investigated. That work would need to include either > collecting data demonstrating that adding those checks will still yield a > stable DEBUG system, or fixing bugs so that the system remains stable. > Only with the checks in-place would I feel comfortable changing the macros > to return unsigned values, but even then I question the point, as I'm > unaware of a pressing need to have a single mblk with 2^31 bytes of data. >
So, doing the math in unsigned integers, and then casting back to a signed type would be OK, right? E.g. #define MBLKL(mp) (intptr_t)((uintptr_t)(mp)->b_wptr - (uintptr_t)(mp)->b_rptr)) Despite what the man page says, I don't want to cast to an (int), because that would represent loss of data, where the old code didn't lose it. -- Garrett _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code