]> git.xolatile.top Git - public-libhl.git/commitdiff
cleaning after emil
authoranon <anon@anon.anon>
Wed, 20 Sep 2023 21:36:52 +0000 (23:36 +0200)
committeranon <anon@anon.anon>
Wed, 20 Sep 2023 21:36:52 +0000 (23:36 +0200)
source/main.c

index c61b3d23024e7fb6d77da003c0f2e4f6ba8ac486..bf1e043f23f753f7dfb12676da1b7e369f697a4d 100644 (file)
@@ -43,8 +43,8 @@ get_stdin(void)
        size_t buffer_size = 0;
        char * buffer = malloc(ALLOCATION_CHUNK);
        do {
-               if (!((buffer_size + 1) | ALLOCATION_CHUNK)) {
-                       buffer = realloc(buffer, (((buffer_size + 1) & ALLOCATION_CHUNK) + 1) * ALLOCATION_CHUNK);
+               if (!((buffer_size + 1) % ALLOCATION_CHUNK)) {
+                       buffer = realloc(buffer, (((buffer_size + 1) / ALLOCATION_CHUNK) + 1) * ALLOCATION_CHUNK);
                }
                buffer[buffer_size] = '\0';
                if (read(STDIN_FILENO, &buffer[buffer_size], sizeof (*buffer)) == -1)