#53 Check return codes everywhere

open-later
Matt
Server (9)
5
2009-01-31
2006-10-31
Markus Elfring
No

I have seen in your package "openqrm-3.0-1.src.tgz"
that some return values are ignored. Would you like
to add any checks for calls like "malloc"
and "fprintf"?

Examples:
- qrm-logger.c: "tee"
-
qrm_infod_functions_win.c: "qrm_bootstrap", "check_int
erfaces"

Discussion

  • Matt
    Matt
    2007-02-15

    Logged In: YES
    user_id=1386555
    Originator: NO

    code clean-up and enhancements were done
    closing bug

     
  • Matt
    Matt
    2007-02-15

    • status: open --> closed-fixed
     
  • Markus Elfring
    Markus Elfring
    2007-04-25

    • assigned_to: drorharel --> mattr_sf
    • status: closed-fixed --> open-fixed
     
  • Matt
    Matt
    2007-04-25

    Logged In: YES
    user_id=1386555
    Originator: NO

    Hey Markus,

    good point, thanks for re-opening the bug. Will assign to our developer crew.

    And yes, we would like to detect every error as early as possible and
    we are still progressing with it so your checks, suggestion and eventual
    patches are more then welcome.

    greetz,

    Matt

     
  • could i take this up. I am a newbie on sourceforge. Also, how do i checkout/checkin the code changes?

     
  • Matt
    Matt
    2009-01-30

    Hi anubhavhanjura,

    :) sure, you are more than welcome. The first step would be to check out openQRM from our svn repo, build it and to get some experiences with it. Then you will find lots of places (i can show you) where simple error checking would help a lot. Please feel free to contact me via my sf-net mail address in case you have any questions.

    many thanks in advance + have a great day,

    Matt Rechenburg

     
  • Markus Elfring
    Markus Elfring
    2009-01-31

    • status: open-fixed --> open-later
     
  • Markus Elfring
    Markus Elfring
    2009-01-31

    Usual design choices are described in the article "Exception Handling Alternatives" by Detlef Vollmann.
    http://accu.org/index.php/journals/546

    You do not need to make assumptions about error situations. Please check all error codes.
    Otherwise, it might not be noticed if anything unexpected went wrong.