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 <rep...@bugs.python.org>
<http://bugs.python.org/issue18994>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to