{GPL, other}: Relicense to MIT license.
[collectd.git] / src / utils_ignorelist.c
index 689b4a4..0ad252b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * collectd - src/utils_ignorelist.c
  * Copyright (C) 2006 Lubos Stanek <lubek at users.sourceforge.net>
- * Copyright (C) 2008 Florian Forster <octo at verplant.org>
+ * Copyright (C) 2008 Florian Forster <octo at collectd.org>
  *
  * This program is free software; you can redistribute it and/
  * or modify it under the terms of the GNU General Public Li-
@@ -20,7 +20,7 @@
  *
  * Authors:
  *   Lubos Stanek <lubek at users.sourceforge.net>
- *   Florian Forster <octo at verplant.org>
+ *   Florian Forster <octo at collectd.org>
  **/
 /**
  * ignorelist handles plugin's list of configured collectable
@@ -311,8 +311,7 @@ int ignorelist_add (ignorelist_t *il, const char *entry)
                /* We need to copy `entry' since it's const */
                entry_copy_size = entry_len - 1;
                entry_copy = smalloc (entry_copy_size);
-               strncpy (entry_copy, entry + 1, entry_copy_size);
-               entry_copy[entry_copy_size - 1] = 0;
+               sstrncpy (entry_copy, entry + 1, entry_copy_size);
 
                DEBUG("I'm about to add regex entry: %s", entry_copy);
                ret = ignorelist_append_regex(il, entry_copy);