On 1 April 2011 18:50, Warner Losh <i...@bsdimp.com> wrote: > On Apr 1, 2011, at 5:40 AM, Sergey Kandaurov wrote: >> >> if (++tempstr >= &tstr[5]) >> >> ^^^^ >> BTW, >> this game with pointers might prevent devstat(3) from work on big-endian. > > I'm very curious about your reasoning here. > Warner
I meant the above comparison of pointers might not work (I'm not sure, as I have no big-endian to test). Look: # iostat -t da,scsi,pass tempstr=0x7fffffffcfa0, &tstr[5]=0x7fffffffcfc8 tempstr=0x7fffffffcfa8, &tstr[5]=0x7fffffffcfc8 tempstr=0x7fffffffcfb0, &tstr[5]=0x7fffffffcfc8 D'oh.. endianness doesn't matter with arrays *blush (Unless that's some system with decreasing memory addressing. Ok, nevermind.) -- wbr, pluknet _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"