Merge branch 'collectd-5.5' into collectd-5.6
[collectd.git] / contrib / examples / myplugin.c
index e1b89f6..ab3ec2f 100644 (file)
@@ -104,7 +104,7 @@ static int my_read (void)
 
        /* it is strongly recommended to use a type defined in the types.db file
         * instead of a custom type */
-       sstrncpy (vl.type, "myplugin", sizeof (vl.plugin));
+       sstrncpy (vl.type, "myplugin", sizeof (vl.type));
        /* optionally set vl.plugin_instance and vl.type_instance to reasonable
         * values (default: "") */
 
@@ -114,7 +114,7 @@ static int my_read (void)
 
        /* A return value != 0 indicates an error and the plugin will be skipped
         * for an increasing amount of time. */
-    return 0;
+       return 0;
 } /* static int my_read (void) */
 
 /*