From 69b8c48ef3eaa09a194ef7adea070476d8665921 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 6 Dec 2023 05:27:21 +0400 Subject: [PATCH] Also remove {} from a for in d5p1. --- day5/p1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/day5/p1.c b/day5/p1.c index 1c587fa..cf788ba 100644 --- a/day5/p1.c +++ b/day5/p1.c @@ -51,12 +51,11 @@ int main(int argc, char **argv) { uint64_t dst = 0, src = 0, rng = 0; sscanf(line, "%lu %lu %lu\n", &dst, &src, &rng); - for (size_t i = 0; i < data_len; ++i) { + for (size_t i = 0; i < data_len; ++i) if (!data_v[i] && data[i] >= src && data[i] < src+rng) { data[i] = dst + (data[i] - src); data_v[i] = true; } - } memset(line, 0, line_buf_length); }