const char *fmt, va_list args)
{
const char *emsg;
- emsg = krb5_get_error_message (util_context, code);
- fprintf (stderr, "%s: %s ", myprog, emsg);
- krb5_free_error_message (util_context, emsg);
+ if (code) {
+ emsg = krb5_get_error_message (util_context, code);
+ fprintf (stderr, "%s: %s ", myprog, emsg);
+ krb5_free_error_message (util_context, emsg);
+ } else {
+ fprintf (stderr, "%s: ", myprog);
+ }
vfprintf (stderr, fmt, args);
fprintf (stderr, "\n");
}
sizeof(char *) * (db5util_db_args_size + 1));
if (temp == NULL)
return 0;
+ db5util_db_args = temp;
db5util_db_args[db5util_db_args_size-1] = arg;
db5util_db_args[db5util_db_args_size] = NULL;
return 1;