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) {

but

    uint32_t bytes;

and the return type of read is int. Suggest code rework.

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