aboutsummaryrefslogtreecommitdiff
path: root/src/lib/util/common_logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/common_logging.c')
-rw-r--r--src/lib/util/common_logging.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/util/common_logging.c b/src/lib/util/common_logging.c
index d27f70e83..458802a07 100644
--- a/src/lib/util/common_logging.c
+++ b/src/lib/util/common_logging.c
@@ -348,7 +348,7 @@ GNUNET_b2s (const void *buf,
348 * @param tm timestamp for which we should setup logging 348 * @param tm timestamp for which we should setup logging
349 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 349 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
350 */ 350 */
351static int 351static enum GNUNET_GenericReturnValue
352setup_log_file (const struct tm *tm) 352setup_log_file (const struct tm *tm)
353{ 353{
354 static char last_fn[PATH_MAX + 1]; 354 static char last_fn[PATH_MAX + 1];
@@ -725,7 +725,7 @@ parse_all_definitions ()
725 * @param logfile which file to write log messages to (can be NULL) 725 * @param logfile which file to write log messages to (can be NULL)
726 * @return #GNUNET_OK on success 726 * @return #GNUNET_OK on success
727 */ 727 */
728int 728enum GNUNET_GenericReturnValue
729GNUNET_log_setup (const char *comp, 729GNUNET_log_setup (const char *comp,
730 const char *loglevel, 730 const char *loglevel,
731 const char *logfile) 731 const char *logfile)
@@ -737,7 +737,10 @@ GNUNET_log_setup (const char *comp,
737 parse_all_definitions (); 737 parse_all_definitions ();
738#endif 738#endif
739 GNUNET_free (component); 739 GNUNET_free (component);
740 GNUNET_asprintf (&component, "%s-%d", comp, getpid ()); 740 GNUNET_asprintf (&component,
741 "%s-%d",
742 comp,
743 getpid ());
741 GNUNET_free (component_nopid); 744 GNUNET_free (component_nopid);
742 component_nopid = GNUNET_strdup (comp); 745 component_nopid = GNUNET_strdup (comp);
743 746