msh

simple shell implementation
Index Commits Files Refs README LICENSE
commit a10a3b1d7d3fc67c4ed237d652d64dc472718d16
parent fc552e8a9484f2dc8297ef495c35a6c35800f2c1
Author: mjkloeckner <martinjkloeckner@gmail.com>
Date:   Sun,  7 May 2023 16:50:15 -0300

remove unnecessary goto

Diffstat:
Mmsh.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/msh.c b/msh.c
@@ -29,7 +29,7 @@ char *buffer_read_line(char *s) {
     while (1) {
         c = getchar();
         if((c == '\n') || (c == EOF))
-            goto end;
+            break;
 
         if(used_size == (buffer_alloc - 1)) {
             if(!(aux = realloc(s, buffer_alloc += buffer_alloc))) {
@@ -41,7 +41,7 @@ char *buffer_read_line(char *s) {
         }
         s[used_size++] = c;
     }
-end:
+
     s[used_size] = '\0';
     if (c == EOF) run = false;
     return s;