main.c:588: poor error checking ?

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

 



Hello there,

main.c:588]: (style) Checking if unsigned variable 'bytes' is less than zero.

Source code is

        bytes = read(fd, buf, size);
        if (bytes < 0) {
            ret = errno;
            goto fail;
        }

but

    uint32_t bytes;

so the error handling code will never be executed.

Regards

David BInderman
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux