Re: [PATCH] lscpu: Add byte order and bogoMIPS information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 17, 2010 at 8:41 AM, Davidlohr Bueso wrote:
> +static
> +int get_byteorder(void)
> +{
> +       int x = 1;
> +       if (*(char *)&x == LENDIAN)
> +               return LENDIAN;
> +       else return BENDIAN;
> +}

this looks like aliasing violations.  since util-linux is autotooled,
use AC_C_BIGENDIAN and then WORDS_BIGENDIAN (assuming util-linux
doesnt already provide something).

> +       if(get_byteorder() == BENDIAN)

missing a space there ... "if (..."
-mike
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux