author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 3 Oct 2008 21:14:44 +0000 (23:14 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 3 Oct 2008 21:14:44 +0000 (23:14 +0200) |
Conflicts:
src/utils_ignorelist.c
src/utils_ignorelist.c
1 | 2 | |||
---|---|---|---|---|
src/collectd.conf.pod | patch | | diff1 | | diff2 | | blob | history |
src/ipvs.c | patch | | diff1 | | diff2 | | blob | history |
src/utils_ignorelist.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc src/collectd.conf.pod
Simple merge
diff --cc src/ipvs.c
Simple merge
diff --cc src/utils_ignorelist.c
index db679dad83f9053e628c916032e23d8438b293a9,689b4a42fd7c506f7dd4a4321071a62e9a9705c0..de42d0fa399035e0f2e3930866d2be670557fc72
+++ b/src/utils_ignorelist.c
if ((entry_len > 2) && (entry[0] == '/') && entry[entry_len - 1] == '/')
{
char *entry_copy;
+ size_t entry_copy_size;
/* We need to copy `entry' since it's const */
- entry_copy = smalloc (entry_len);
- memset (entry_copy, '\0', entry_len);
- /* sstrncpy() overwrites the trailing '/' */
- sstrncpy (entry_copy, entry + 1, entry_len - 1);
+ 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);