From 1923dbad4f1bcc37ab74c6f266374edd7226d704 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Fri, 22 Dec 2023 14:37:42 -0800 Subject: [PATCH] REBASE use_chunkifier ? --- tar/multitape/multitape_write.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tar/multitape/multitape_write.c b/tar/multitape/multitape_write.c index 015f68b7..e52aba6d 100644 --- a/tar/multitape/multitape_write.c +++ b/tar/multitape/multitape_write.c @@ -104,11 +104,11 @@ static int flushtape(TAPE_W *, int); /* Initialize stream. */ static int stream_init(struct stream * S, chunkify_callback callback, void * cookie, - int no_chunkifier) + int use_chunkifier) { /* Create chunkifier. */ - if (!no_chunkifier) { + if (use_chunkifier) { if ((S->c = chunkify_init(MEANCHUNK, MAXCHUNK, callback, cookie)) == NULL) goto err0; @@ -416,13 +416,13 @@ writetape_open(uint64_t machinenum, const char * cachedir, struct multitape_write_internal * d; uint8_t lastseq[32]; size_t argvlen; - int no_chunkifiers; + int use_chunkifiers; /* Sanity check options. */ assert(!((dryrun == 2) && printstats)); /* We want to the chunkifier in this case. */ - no_chunkifiers = (dryrun == 2); + use_chunkifiers = (dryrun != 2); /* Allocate memory. */ if ((d = malloc(sizeof(struct multitape_write_internal))) == NULL) @@ -509,11 +509,11 @@ writetape_open(uint64_t machinenum, const char * cachedir, goto err6; /* Initialize streams. */ - if (stream_init(&d->h, &callback_h, (void *)d, no_chunkifiers)) + if (stream_init(&d->h, &callback_h, (void *)d, use_chunkifiers)) goto err6; - if (stream_init(&d->c, &callback_c, (void *)d, no_chunkifiers)) + if (stream_init(&d->c, &callback_c, (void *)d, use_chunkifiers)) goto err7; - if (stream_init(&d->t, &callback_t, (void *)d, no_chunkifiers)) + if (stream_init(&d->t, &callback_t, (void *)d, use_chunkifiers)) goto err8; /* Initialize header buffer. */ @@ -521,7 +521,7 @@ writetape_open(uint64_t machinenum, const char * cachedir, goto err9; /* Initialize file chunkifier. */ - if (!no_chunkifiers) { + if (use_chunkifiers) { if ((d->c_file = chunkify_init(MEANCHUNK, MAXCHUNK, &callback_file, (void *)d)) == NULL) goto err10;