[hackers] [st] tresize return value is not used || noname

From: <git_AT_suckless.org>
Date: Tue, 12 Aug 2014 18:31:32 +0200

commit 20c4f122543b67c0cdcefd151eb38b3bee599c10
Author: noname <noname_AT_inventati.org>
Date: Mon Apr 28 02:03:04 2014 +0400

    tresize return value is not used
    
    Signed-off-by: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>

diff --git a/st.c b/st.c
index e0aae9d..9eebbe4 100644
--- a/st.c
+++ b/st.c
_AT_@ -382,7 +382,7 @@ static void tnewline(int);
 static void tputtab(int);
 static void tputc(char *, int);
 static void treset(void);
-static int tresize(int, int);
+static void tresize(int, int);
 static void tscrollup(int, int);
 static void tscrolldown(int, int);
 static void tsetattr(int *, int);
_AT_@ -2656,7 +2656,7 @@ tputc(char *c, int len) {
         }
 }
 
-int
+void
 tresize(int col, int row) {
         int i;
         int minrow = MIN(row, term.row);
_AT_@ -2666,8 +2666,11 @@ tresize(int col, int row) {
         Line *orig;
         TCursor c;
 
- if(col < 1 || row < 1)
- return 0;
+ if(col < 1 || row < 1) {
+ fprintf(stderr,
+ "tresize: error resizing to %dx%d
", col, row);
+ return;
+ }
 
         /* free unneeded rows */
         i = 0;
_AT_@ -2738,8 +2741,6 @@ tresize(int col, int row) {
                 tcursor(CURSOR_LOAD);
         } while(orig != term.line);
         term.c = c;
-
- return (slide > 0);
 }
 
 void
Received on Tue Aug 12 2014 - 18:31:32 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 12 2014 - 18:36:08 CEST