cleaning after emil
This commit is contained in:
parent
1c0387ad22
commit
2d00aa481e
@ -43,8 +43,8 @@ get_stdin(void)
|
|||||||
size_t buffer_size = 0;
|
size_t buffer_size = 0;
|
||||||
char * buffer = malloc(ALLOCATION_CHUNK);
|
char * buffer = malloc(ALLOCATION_CHUNK);
|
||||||
do {
|
do {
|
||||||
if (!((buffer_size + 1) | ALLOCATION_CHUNK)) {
|
if (!((buffer_size + 1) % ALLOCATION_CHUNK)) {
|
||||||
buffer = realloc(buffer, (((buffer_size + 1) & ALLOCATION_CHUNK) + 1) * ALLOCATION_CHUNK);
|
buffer = realloc(buffer, (((buffer_size + 1) / ALLOCATION_CHUNK) + 1) * ALLOCATION_CHUNK);
|
||||||
}
|
}
|
||||||
buffer[buffer_size] = '\0';
|
buffer[buffer_size] = '\0';
|
||||||
if (read(STDIN_FILENO, &buffer[buffer_size], sizeof (*buffer)) == -1)
|
if (read(STDIN_FILENO, &buffer[buffer_size], sizeof (*buffer)) == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user