Menu ▾ ▴

#156 Check return codes everywhere

v3.2.3
open-fixed
Service (34)
5
2007-04-02
2007-02-01
No

Some checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "malloc" like in the function "setLogfilePath" and from "pthread_mutex_lock" in the function "lockLoggingMutex"?
http://wrapper.svn.sourceforge.net/viewvc/wrapper/trunk/wrapper/src/c/logger.c?revision=1273&view=markup

Discussion

  • Leif Mortenson

    Leif Mortenson - 2007-02-02
    • assigned_to: nobody --> mortenson
    • status: open --> open-accepted
     
  • Leif Mortenson

    Leif Mortenson - 2007-02-02

    Logged In: YES
    user_id=228081
    Originator: NO

    Will do. I do check them in a lot of places, but I know it is not near 100%.

    Did you notice this because of a code review, or were you experiencing some problems?

    Cheers,
    Leif

     
  • Markus Elfring

    Markus Elfring - 2007-02-02

    Logged In: YES
    user_id=572001
    Originator: YES

    I spot this open issue by my little review.

    It is popular to ignore error codes from such functions.

     
  • Leif Mortenson

    Leif Mortenson - 2007-04-02

    Logged In: YES
    user_id=228081
    Originator: NO

    Checks have been added throughout the codebase.
    These changes will be in the next release.

    Cheers,
    Leif

     
  • Leif Mortenson

    Leif Mortenson - 2007-04-02
    • status: open-accepted --> open-fixed
     
  • Markus Elfring

    Markus Elfring - 2007-04-02

    Logged In: YES
    user_id=572001
    Originator: YES

    There are more unchecked function calls to fix.
    Examples:
    - fclose
    - printf (Would you like to replace it by "perror()"?)

     

Log in to post a comment.