Merge branch 'collectd-5.6'
[collectd.git] / src / exec.c
index 1a14293..3a09cb7 100644 (file)
@@ -274,7 +274,7 @@ static void set_environment (void) /* {{{ */
       CDTIME_T_TO_DOUBLE (plugin_get_interval ()));
   setenv ("COLLECTD_INTERVAL", buffer, /* overwrite = */ 1);
 
-  ssnprintf (buffer, sizeof (buffer), "%s", hostname_g);
+  sstrncpy (buffer, hostname_g, sizeof (buffer));
   setenv ("COLLECTD_HOSTNAME", buffer, /* overwrite = */ 1);
 #else
   ssnprintf (buffer, sizeof (buffer), "COLLECTD_INTERVAL=%.3f",
@@ -817,7 +817,7 @@ static int exec_init (void) /* {{{ */
     if (getuid () == 0)
       WARNING ("exec plugin: Running collectd as root, but the CAP_SETUID "
           "or CAP_SETGID capabilities are missing. The plugin's read function "
-          "will probably fail. Is your init system dropping capabilities ?");
+          "will probably fail. Is your init system dropping capabilities?");
     else
       WARNING ("exec plugin: collectd doesn't have the CAP_SETUID or "
           "CAP_SETGID capabilities. If you don't want to run collectd as root, "