summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@dahyabhai.net>2013-08-06 17:20:04 -0400
committerNalin Dahyabhai <nalin@dahyabhai.net>2013-08-12 15:43:31 -0400
commite0e28b17f4cff80b0ca1635da7304dfa185323dd (patch)
tree49b269e23e9be919f9953be6d806561377212aa5
parent4da7dc8a2197598205cb7eab66bb6a1b15aa2f96 (diff)
downloadslapi-nis-e0e28b17f4cff80b0ca1635da7304dfa185323dd.tar.gz
slapi-nis-e0e28b17f4cff80b0ca1635da7304dfa185323dd.tar.xz
slapi-nis-e0e28b17f4cff80b0ca1635da7304dfa185323dd.zip
Formatting, implicit NULL checks
-rw-r--r--src/back-sch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/back-sch.c b/src/back-sch.c
index 2259e36..c96179a 100644
--- a/src/back-sch.c
+++ b/src/back-sch.c
@@ -1302,8 +1302,9 @@ backend_search_cb(Slapi_PBlock *pb)
if (cbdata.staged != NULL) {
/* Allocate buffer to be used for getpwnam_r/getgrnam_r requests */
cbdata.nsswitch_buffer_len = MAX(sysconf(_SC_GETPW_R_SIZE_MAX), sysconf(_SC_GETGR_R_SIZE_MAX));
- if (cbdata.nsswitch_buffer_len == -1)
+ if (cbdata.nsswitch_buffer_len == -1) {
cbdata.nsswitch_buffer_len = 16384;
+ }
cbdata.nsswitch_buffer = malloc(cbdata.nsswitch_buffer_len);
/* Go over the list of staged requests and retrieve entries.
* It is important to perform the retrieval *without* holding any locks to the map cache */
@@ -1312,15 +1313,14 @@ backend_search_cb(Slapi_PBlock *pb)
if (staged->entries == NULL) {
backend_retrieve_from_nsswitch(staged, &cbdata);
}
- next = staged->next;
staged = staged->next;
}
- staged = cbdata.staged;
/* Add the entries to the map cache */
wrap_inc_call_level();
map_wrlock();
+ staged = cbdata.staged;
while (staged != NULL) {
- if (staged->entries) {
+ if (staged->entries != NULL) {
cbdata.cur_staged = staged;
/* We actually need to find the original set first */
map_data_foreach_domain(cbdata.state, backend_search_find_set_data_cb, &cbdata);