]> the.earth.li Git - onak.git/commitdiff
Fix "onak dump" to actually generate multiple output files
authorJonathan McDowell <noodles@earth.li>
Tue, 18 Aug 2009 16:36:51 +0000 (17:36 +0100)
committerJonathan McDowell <noodles@earth.li>
Tue, 18 Aug 2009 16:36:51 +0000 (17:36 +0100)
  We weren't incrementing the key count so everything went into a
  single file instead of limiting the file size.

onak.c

diff --git a/onak.c b/onak.c
index 30f771084931b3ee249f8d2e497d2d0edff89b55..40e8b0e09277850b8beb4fa6c2465c16726f9efe 100644 (file)
--- 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;