/* Find the top backend for this subordinate */
be = b0;
- while ( be=LDAP_STAILQ_NEXT( be, be_next )) {
+ while ( (be=LDAP_STAILQ_NEXT( be, be_next )) != NULL ) {
slap_overinfo *oi;
slap_overinst *on;
glueinfo *gi;
/* Find the top backend for this subordinate */
be = ga->ga_be;
- while ( be=LDAP_STAILQ_NEXT( be, be_next )) {
+ while ( (be=LDAP_STAILQ_NEXT( be, be_next )) != NULL ) {
slap_overinfo *oi;
slap_overinst *on;
glueinfo *gi;
ber_socket_t i;
int ns, nwriters;
int at;
- ber_socket_t nfds, nrfds, nwfds;
+ ber_socket_t nfds;
+#if SLAP_EVENTS_ARE_INDEXED
+ ber_socket_t nrfds, nwfds;
+#endif
#define SLAPD_EBADF_LIMIT 16
time_t now;