[hackers] [sandy] fix uninitialized variables || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sat, 11 Oct 2014 20:53:02 +0200

commit e73326c64a792cd4582a3833c3537be4906fe52a
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sun Jul 27 13:49:25 2014 +0000

    fix uninitialized variables

diff --git a/sandy.c b/sandy.c
index 0efe201..d08b683 100644
--- a/sandy.c
+++ b/sandy.c
_AT_@ -1755,10 +1755,10 @@ i_termwininit(void) {
 void
 i_update(void) {
         int iline, irow, ixrow, ivchar, i, ifg, ibg, vlines;
- size_t ichar;
- int cursor_r, cursor_c;
+ int cursor_r = 0, cursor_c = 0;
         int lines3; /* How many lines fit on screen */
- long int nscr, ncur, nlst; /* Line number for scrline, fcur.l and lstline */
+ long int nscr, ncur = 1, nlst = 1; /* Line number for scrline, fcur.l and lstline */
+ size_t ichar;
         bool selection;
         regmatch_t match[SYN_COLORS][1];
         Line *l;
Received on Sat Oct 11 2014 - 20:53:02 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 11 2014 - 21:00:09 CEST