Browse Source

add two asserts to help parfait (#2530)

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2931 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.34
Stefan Bühler 8 years ago
parent
commit
524e0a30a0
  1. 1
      src/array.c
  2. 1
      src/configfile.c

1
src/array.c

@ -170,6 +170,7 @@ void array_set_key_value(array *hdrs, const char *key, size_t key_len, const cha
data_unset *array_replace(array *a, data_unset *du) {
int ndx;
assert(NULL != du);
if (-1 == (ndx = array_get_index(a, du->key->ptr, du->key->used, NULL))) {
array_insert_unique(a, du);
return NULL;

1
src/configfile.c

@ -1170,6 +1170,7 @@ int config_read(server *srv, const char *fn) {
}
prepends = (data_array *)configparser_merge_data((data_unset *)prepends, (data_unset *)modules);
assert(NULL != prepends);
buffer_copy_string_buffer(prepends->key, modules->key);
array_replace(srv->config, (data_unset *)prepends);
modules->free((data_unset *)modules);

Loading…
Cancel
Save