about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2022-06-29 10:34:59 +0200
committerMichael Vetter <jubalh@iodoru.org>2022-06-29 10:34:59 +0200
commit945ac79364e344c1a9de7a1e7daecfa2165e35d2 (patch)
tree789cdc49fcbfecb7b1a7c035d09a18bf6d51020d
parent7713223ddb698f798597ee07c6bbdabe698da02d (diff)
downloadprofani-tty-945ac79364e344c1a9de7a1e7daecfa2165e35d2.tar.gz
scripts: get rid of read variable
-rw-r--r--src/config/scripts.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/config/scripts.c b/src/config/scripts.c
index 3f006f77..aca85173 100644
--- a/src/config/scripts.c
+++ b/src/config/scripts.c
@@ -112,10 +112,9 @@ scripts_read(const char* const script)
 
     char* line = NULL;
     size_t len = 0;
-    ssize_t read;
     GSList* result = NULL;
 
-    while ((read = getline(&line, &len, scriptfile)) != -1) {
+    while (getline(&line, &len, scriptfile) != -1) {
         if (g_str_has_suffix(line, "\n")) {
             result = g_slist_append(result, g_strndup(line, strlen(line) - 1));
         } else {
@@ -150,9 +149,8 @@ scripts_exec(const char* const script)
 
     char* line = NULL;
     size_t len = 0;
-    ssize_t read;
 
-    while ((read = getline(&line, &len, scriptfile)) != -1) {
+    while (getline(&line, &len, scriptfile) != -1) {
         ProfWin* win = wins_get_current();
         cmd_process_input(win, line);
         session_process_events();