summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c0be68f)
raw | patch | inline | side by side (parent: c0be68f)
author | Florian Forster <octo@huhu.verplant.org> | |
Sun, 2 Jan 2011 21:20:14 +0000 (22:20 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sun, 2 Jan 2011 21:20:14 +0000 (22:20 +0100) |
src/common.c | patch | blob | history |
diff --git a/src/common.c b/src/common.c
index 7813d5bbf3baede0a499e1c4b3b0dee7f47ef315..142d7979adf1fc2c02e6a54d9a4bdc8483598c4e 100644 (file)
--- a/src/common.c
+++ b/src/common.c
sstrncpy (vl->host, host, sizeof (host));
sstrncpy (vl->plugin, plugin, sizeof (plugin));
- sstrncpy (vl->plugin_instance, plugin_instance, sizeof (plugin_instance));
+ sstrncpy (vl->plugin_instance,
+ (plugin_instance != NULL) ? plugin_instance : "",
+ sizeof (plugin_instance));
sstrncpy (vl->type, type, sizeof (type));
- sstrncpy (vl->type_instance, type_instance, sizeof (type_instance));
+ sstrncpy (vl->type_instance,
+ (type_instance != NULL) ? type_instance : "",
+ sizeof (type_instance));
return (0);
} /* }}} int parse_identifier_vl */