Ignore:
Timestamp:
Sep 9, 2012, 5:22:30 AM (13 years ago)
Author:
bird
Message:

Made TRACE2 and TRACE2V safe. Fixed DEBUG bug where va_copy was missing. Introduced sh_strerror.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/shinstance.c

    r2593 r2648  
    14171417}
    14181418
     1419
     1420/* Wrapper for strerror that makes sure it doesn't return NULL and causes the
     1421   caller or fprintf routines to crash. */
     1422const char *sh_strerror(shinstance *psh, int error)
     1423{
     1424    char *err = strerror(error);
     1425    if (!err)
     1426        return "strerror return NULL!";
     1427    (void)psh;
     1428    return err;
     1429}
     1430
Note: See TracChangeset for help on using the changeset viewer.