what is point of: if ('\0' != 0)

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

 



Hi,

In file sys-utils/lscpu-dmi.c there is following if statement.

-- snip
int read_hypervisor_dmi(void)
{
[...]
        if (sizeof(uint8_t) != 1
            || sizeof(uint16_t) != 2
            || sizeof(uint32_t) != 4
            || '\0' != 0)
                return rc;
-- snip

Comparing '\0' to value of zero is pointless, or is it? If the strange
looking line is correct adding an explaining comment what that does
would be nice.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" 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