diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-08 21:09:14 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-08 21:09:14 +0000 |
commit | 78a3a2fbd9fababb87405e0edda58460519c15ee (patch) | |
tree | 1d2c85c47214dd1e7c5b26bbf3c1cd33d19d7bba /usr.bin/vi | |
parent | 9167dcd91e80437eb556bdb53f7acc3a767270aa (diff) |
Fix one more uninitialized variable scenario; from Ray Lai.
Diffstat (limited to 'usr.bin/vi')
-rw-r--r-- | usr.bin/vi/common/cut.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/vi/common/cut.c b/usr.bin/vi/common/cut.c index 0148bdb6cbe..f263a3c0b19 100644 --- a/usr.bin/vi/common/cut.c +++ b/usr.bin/vi/common/cut.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cut.c,v 1.9 2006/01/08 21:05:39 miod Exp $ */ +/* $OpenBSD: cut.c,v 1.10 2006/01/08 21:09:13 miod Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -73,7 +73,7 @@ cut(sp, namep, fm, tm, flags) int flags; { CB *cbp; - CHAR_T name; + CHAR_T name = '1'; /* default numeric buffer */ recno_t lno; int append, copy_one, copy_def; @@ -115,7 +115,7 @@ cut(sp, namep, fm, tm, flags) namecb: CBNAME(sp, cbp, name); } else if (LF_ISSET(CUT_NUMREQ) || (LF_ISSET(CUT_NUMOPT) && (LF_ISSET(CUT_LINEMODE) || fm->lno != tm->lno))) { - name = '1'; + /* Copy into numeric buffer 1. */ cb_rotate(sp); goto namecb; } else @@ -168,7 +168,6 @@ copyloop: sp->gp->dcbp = cbp; /* Repoint the default buffer on each pass. */ if (copy_one) { /* Copy into numeric buffer 1. */ - name = '1'; CBNAME(sp, cbp, name); copy_one = 0; goto copyloop; |