From: Jonathan McDowell Date: Tue, 18 Aug 2009 16:36:51 +0000 (+0100) Subject: Fix "onak dump" to actually generate multiple output files X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/commitdiff_plain/efdb27e3516c0de570a7a1476d15c4e84ac0d25c?ds=inline;hp=d3e43ff563940e161075fe6cad02dd558e85ed8d Fix "onak dump" to actually generate multiple output files We weren't incrementing the key count so everything went into a single file instead of limiting the file size. --- diff --git a/onak.c b/onak.c index 30f7710..40e8b0e 100644 --- a/onak.c +++ b/onak.c @@ -74,7 +74,7 @@ void dump_func(void *ctx, struct openpgp_publickey *key) state = (struct dump_ctx *) ctx; - if (state->fd == -1 || state->count > state->maxcount) { + if (state->fd == -1 || state->count++ > state->maxcount) { if (state->fd != -1) { close(state->fd); state->fd = -1;