aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-22 15:43:08 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-22 15:43:08 -0400
commit2a8db73a10373d858df6ef026811047bfbf4083f (patch)
tree7059e24bfb857bedbb631ac2a636171696d6c8bf /src
parenta4faeac5b4f9913b9a58f9983f4a779342d32fb6 (diff)
downloadstasis-2a8db73a10373d858df6ef026811047bfbf4083f.tar.gz
Use snprintf
Diffstat (limited to 'src')
-rw-r--r--src/lib/core/multiprocessing.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/core/multiprocessing.c b/src/lib/core/multiprocessing.c
index 2995568..69bcc02 100644
--- a/src/lib/core/multiprocessing.c
+++ b/src/lib/core/multiprocessing.c
@@ -76,7 +76,7 @@ int child(struct MultiProcessingPool *pool, struct MultiProcessingTask *task) {
if (globals.enable_task_logging) {
const char *log_file_fmt = "task-%zu-%d.log";
const int log_file_len = snprintf(NULL, 0, log_file_fmt, mp_global_task_count, task->parent_pid);
- snprintf(task->log_file + strlen(task->log_file), sizeof(task->log_file) - log_file_len, log_file_fmt, mp_global_task_count, task->parent_pid);
+ snprintf(task->log_file + strlen(task->log_file), sizeof(task->log_file) - strlen(task->log_file) - log_file_len, log_file_fmt, mp_global_task_count, task->parent_pid);
}
fp_log = freopen(task->log_file, "w+", stdout);
if (!fp_log) {