diff options
author | 2012-11-19 17:58:32 +0100 | |
---|---|---|
committer | 2012-11-19 17:58:32 +0100 | |
commit | 7202862fd909a1c8eccad6de13d7177f9a8a629c (patch) | |
tree | 156090a53dc6960053afa69354c0d51dde7bb3cf /smtpd/config.c | |
parent | remove all calls to table_backend_lookup() outside of table_create (diff) | |
download | OpenSMTPD-7202862fd909a1c8eccad6de13d7177f9a8a629c.tar.xz OpenSMTPD-7202862fd909a1c8eccad6de13d7177f9a8a629c.zip |
KNF and formating
Diffstat (limited to 'smtpd/config.c')
-rw-r--r-- | smtpd/config.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/smtpd/config.c b/smtpd/config.c index c4d695cd..a2c3557b 100644 --- a/smtpd/config.c +++ b/smtpd/config.c @@ -180,7 +180,7 @@ config_pipes(struct peer *p, uint peercount) void config_peers(struct peer *p, uint peercount) { - int count; + int n; uint src; uint dst; uint i; @@ -198,20 +198,20 @@ config_peers(struct peer *p, uint peercount) env->sc_ievs[dst] = xcalloc(env->sc_instances[dst], sizeof(struct imsgev), "config_peers"); - for (count = 0; count < env->sc_instances[dst]; count++) { - imsg_init(&(env->sc_ievs[dst][count].ibuf), - env->sc_pipes[src][dst][count]); - env->sc_ievs[dst][count].handler = p[i].cb; - env->sc_ievs[dst][count].events = EV_READ; - env->sc_ievs[dst][count].proc = dst; - env->sc_ievs[dst][count].data = &env->sc_ievs[dst][count]; - - event_set(&(env->sc_ievs[dst][count].ev), - env->sc_ievs[dst][count].ibuf.fd, - env->sc_ievs[dst][count].events, - env->sc_ievs[dst][count].handler, - env->sc_ievs[dst][count].data); - event_add(&(env->sc_ievs[dst][count].ev), NULL); + for (n = 0; n < env->sc_instances[dst]; n++) { + imsg_init(&(env->sc_ievs[dst][n].ibuf), + env->sc_pipes[src][dst][n]); + env->sc_ievs[dst][n].handler = p[i].cb; + env->sc_ievs[dst][n].events = EV_READ; + env->sc_ievs[dst][n].proc = dst; + env->sc_ievs[dst][n].data = &env->sc_ievs[dst][n]; + + event_set(&(env->sc_ievs[dst][n].ev), + env->sc_ievs[dst][n].ibuf.fd, + env->sc_ievs[dst][n].events, + env->sc_ievs[dst][n].handler, + env->sc_ievs[dst][n].data); + event_add(&(env->sc_ievs[dst][n].ev), NULL); } } } |