X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fexamples%2Fmyplugin.c;h=ab3ec2fd383df59a5f4c6624ee1d79a554c09fc5;hb=d0408cb0dbef15d739a6b1cd047e9c94d7643329;hp=9539062c9383b88ace7e06954ec60e6bb9fa6684;hpb=a7eecf6018a684dcf8323d4a41a7e704a5d57f02;p=collectd.git diff --git a/contrib/examples/myplugin.c b/contrib/examples/myplugin.c index 9539062c..ab3ec2fd 100644 --- a/contrib/examples/myplugin.c +++ b/contrib/examples/myplugin.c @@ -39,6 +39,7 @@ #endif /* ! HAVE_CONFIG */ #include + #include #include @@ -103,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: "") */ @@ -113,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) */ /*