Menu

#62 Check return codes everywhere in tipc-config

closed
Missing (16)
5
2018-05-22
2007-02-13
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 "zone_master_main" and from "printf" in the function "show_link_stats"?
http://tipc.cvs.sourceforge.net/tipc/source/unstable/tools/tipc-config.c?revision=1.24&view=markup

Discussion

  • Allan Stephens

    Allan Stephens - 2007-02-13
    • status: open --> pending
     
  • Allan Stephens

    Allan Stephens - 2007-02-13

    Logged In: YES
    user_id=995681
    Originator: NO

    The zone_master_main() routine isn't currently utilized in tipc-config; it is a hold-over from an earlier version of tipc-config, and is being kept around in case we might someday want to use it as a basis for implementing the TIPC "zone master" capability.

    I'm not sure if there is any value in checking the result of the printf() in show_link_stats(), since I can't imagine any conditions under which the operation would ever fail.

     
  • Markus Elfring

    Markus Elfring - 2007-02-13
    • assigned_to: nobody --> ajstephens
    • status: pending --> open
     
  • Markus Elfring

    Markus Elfring - 2007-02-13

    Logged In: YES
    user_id=572001
    Originator: YES

    How much do you care for unchecked function calls?

    A possible error condition is ENOMEM.
    http://opengroup.org/onlinepubs/009695399/functions/fprintf.html

     
  • Allan Stephens

    Allan Stephens - 2007-11-20
    • labels: 644800 --> Missing
    • summary: Check return codes everywhere --> Check return codes everywhere in tipc-config
     
  • Allan Stephens

    Allan Stephens - 2007-11-20

    Logged In: YES
    user_id=995681
    Originator: NO

    I've re-classified this issue from "bug" to "missing", since it is arguably more of a feature request than a significant problem. (If users start running into issues with this lack we can revisit this ...)

    If someone desperately wants to fix this, feel free to go ahead.

     
  • Allan Stephens

    Allan Stephens - 2008-10-28
    • assigned_to: ajstephens --> nobody
     
  • Jon Paul Maloy

    Jon Paul Maloy - 2018-05-22
    • Owner: Anonymous --> Jon Paul Maloy
    • Status: open --> closed
     

Log in to post a comment.