Fix for deadcode in unique_create() so that "opened_name" parameter is
always initialized to a valid string or NULL when returning from
function.
Fix for redirect_output() so that "logfile" is not blindly used in
fprintf() call and checked if it is not NULL.
Signed-off-by: Tomas Hozza <thozza@redhat.com>
+2013-04-26 Tomas Hozza <thozza@redhat.com> (tiny change)
+
+ * log.c (redirect_output): Use DEFAULT_LOGFILE in diagnostic message
+ when `logfile' is NULL.
+ * utils.c (unique_create): Ensure `logfile' has always a value.
+
2013-06-26 Darshit Shah <darnir@gmail.com>
* http.c (gethttp): Reverse change by commit 90896 that prevented
can do but disable printing completely. */
fprintf (stderr, _("\n%s received.\n"), redirect_request_signal_name);
fprintf (stderr, _("%s: %s; disabling logging.\n"),
- logfile, strerror (errno));
+ (logfile) ? logfile : DEFAULT_LOGFILE, strerror (errno));
inhibit_logging = true;
}
save_context_p = false;
xfree (uname);
uname = unique_name (name, false);
}
- if (opened_name && fp != NULL)
+ if (opened_name)
{
if (fp)
*opened_name = uname;