[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <567C316A.6020406@users.sourceforge.net>
Date: Thu, 24 Dec 2015 18:54:50 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Jonathan Corbet <corbet@....net>
Cc: linux-doc@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: Documentation-getdelays: Fix a check for container file usage in
main()
>> The close() function could be called by the main() function even if
>> the passed variable "cfd" was assigned a negative value.
…
> This seems more easily fixed by simply making the condition > 0.
How do you think about the reuse of the error predicate "cfd != -1"
for the return value from a call of the function "open"?
http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/accounting/getdelays.c?id=80c75a0f1d81922bf322c0634d1e1a15825a89e6#n425
> Meanwhile, I'd really not add labels-inside-if-statements as an example
> in the documentation tree.
How are the chances to improve the affected error detection
and corresponding exception handling?
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists