diff options
author | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-04-18 13:57:44 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-04-18 13:57:44 -0400 |
commit | 889ea2028e9cb7d52bda0a42df6a502b97258b58 (patch) | |
tree | 5bfef94af59820c88a50ebc530b4fb70ffcaecf9 /src/map.c | |
parent | 361673c107eba158a15b952c7aaaf1f9c1782b3f (diff) | |
download | slapi-nis-889ea2028e9cb7d52bda0a42df6a502b97258b58.tar.gz slapi-nis-889ea2028e9cb7d52bda0a42df6a502b97258b58.tar.xz slapi-nis-889ea2028e9cb7d52bda0a42df6a502b97258b58.zip |
- allow "-1" for a datum's size to be used as shorthand for "use strlen()"
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -454,6 +454,12 @@ map_data_set_entry(struct plugin_state *state, struct map *map; struct entry *entry; map = map_data_find_map(state, domain_name, map_name); + if (key_len == (unsigned int) -1) { + key_len = strlen(key); + } + if (value_len == (unsigned int) -1) { + value_len = strlen(value); + } if (map != NULL) { entry = map_data_find_map_entry_id(state, map, id); if (entry != NULL) { |