Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: The const in the arg list to audit_log() meant the cast was erroneous.

...

Code Block
void audit_log(const char *errstr) {  /* Legacy function defined elsewhere - cannot be modified */
  fprintf(stderr, "Error: %s.\n", errstr);
}

/* ... */
const char INVFNAME[]  = "Invalid file name.";
audit_log((char *)INVFNAME);
/* ... */

...