- entrytemp = smalloc(strlen(entry) - 2);
- sstrncpy(entrytemp, &entry[1], strlen(entry) - 1);
- DBG("to add regex entry: %s", entrytemp);
- restemp = ignorelist_regappend(conflist, entrytemp);
- sfree (entrytemp);
+ char *entry_copy;
+
+ /* We need to copy `entry' since it's const */
+ entry_copy = smalloc (entry_len);
+ memset (entry_copy, '\0', entry_len);
+ strncpy (entry_copy, entry + 1, entry_len - 2);
+
+ DEBUG("I'm about to add regex entry: %s", entry_copy);
+ ret = ignorelist_append_regex(il, entry_copy);
+ sfree (entry_copy);