Browse Source

cleaning after emil

master
anon 8 months ago
parent
commit
2d00aa481e
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      source/main.c

+ 2
- 2
source/main.c View 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)


Loading…
Cancel
Save