aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/stream_decoder_mt.c
diff options
context:
space:
mode:
authorDimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com>2023-07-31 14:02:21 +0200
committerGitHub <noreply@github.com>2023-07-31 20:02:21 +0800
commit42df7c7aa1cca385e509eb33c65136e61890f0bf (patch)
treec537bd6d60be9ac2d71ca3d7f887cde8d8e92ed1 /src/liblzma/common/stream_decoder_mt.c
parentUpdate .gitignore. (diff)
downloadxz-42df7c7aa1cca385e509eb33c65136e61890f0bf.tar.xz
Docs: Fix typos found by codespell
Diffstat (limited to '')
-rw-r--r--src/liblzma/common/stream_decoder_mt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liblzma/common/stream_decoder_mt.c b/src/liblzma/common/stream_decoder_mt.c
index b8ba4d39..76212b46 100644
--- a/src/liblzma/common/stream_decoder_mt.c
+++ b/src/liblzma/common/stream_decoder_mt.c
@@ -629,7 +629,7 @@ get_thread(struct lzma_stream_coder *coder, const lzma_allocator *allocator)
coder->thr = coder->threads_free;
coder->threads_free = coder->threads_free->next;
- // The thread is no longer in the cache so substract
+ // The thread is no longer in the cache so subtract
// it from the cached memory usage. Don't add it
// to mem_in_use though; the caller will handle it
// since it knows how much memory it will actually
@@ -1359,7 +1359,7 @@ stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
// towards more favorable conditions (less memory in use,
// more in cache).
//
- // These are initalized to silence warnings.
+ // These are initialized to silence warnings.
uint64_t mem_in_use = 0;
uint64_t mem_cached = 0;
struct worker_thread *thr = NULL;
@@ -1425,7 +1425,7 @@ stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
}
// Update the memory usage counters. Note that coder->mem_*
- // may have changed since we read them so we must substract
+ // may have changed since we read them so we must subtract
// or add the changes.
mythread_sync(coder->mutex) {
coder->mem_cached -= mem_freed;
@@ -1438,7 +1438,7 @@ stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
// coder->mem_cached might count the same thing twice.
// If so, this will get corrected in get_thread() when
// a worker_thread is picked from coder->free_threads
- // and its memory usage is substracted from mem_cached.
+ // and its memory usage is subtracted from mem_cached.
coder->mem_in_use += coder->mem_next_in
+ coder->mem_next_filters;
}