[issue18994] Inside fcntl module, we does not check the return code of all_ins function
Vajrasky Kok
report at bugs.python.org
Sun Sep 15 11:06:36 CEST 2013
Vajrasky Kok added the comment:
Charles-François Natali, sorry I just noticed Ezio's comment. The all_ins function return -1 on failure and 0 on success.
I use this form:
if (all_ins(m))
return NULL;
because I follow the example in Modules/posixmodule.c. If this form:
if (all_ins(m) < 0)
return NULL;
is better, then so be it, here is the patch to accommodate Ezio's suggestion.
----------
Added file: http://bugs.python.org/file31765/check_return_code_all_ins_in_fcntl_v2.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18994>
_______________________________________
More information about the Python-bugs-list
mailing list