diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-08-12 23:34:08 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-08-12 23:34:08 +0200 |
commit | b3fd6c01eda647c70115befbb532cbb4aff9723f (patch) | |
tree | 17fd477d5e083d28fb7e0b3fc920bfc4d4186c15 /src/mainwindow.c | |
parent | f59d6ab0005113ec93325b747834a2c62a969dfd (diff) |
Remove a pointless variable
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r-- | src/mainwindow.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index 47513c4..9375463 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -927,7 +927,7 @@ void update_titlebar(struct presentation *p) static void insert_text(struct frame *fr, char *t, struct presentation *p) { char *tmp; - size_t tlen, olen, offs; + size_t tlen, olen; int i; /* If this is, say, the top level frame, do nothing */ @@ -951,16 +951,14 @@ static void insert_text(struct frame *fr, char *t, struct presentation *p) tmp = malloc(fr->sc_len); if ( tmp == NULL ) return; - offs = fr->pos; - - for ( i=0; i<offs; i++ ) { + for ( i=0; i<fr->pos; i++ ) { tmp[i] = fr->sc[i]; } for ( i=0; i<tlen; i++ ) { - tmp[i+offs] = t[i]; + tmp[i+fr->pos] = t[i]; } for ( i=0; i<olen-fr->pos; i++ ) { - tmp[i+offs+tlen] = fr->sc[i+offs]; + tmp[i+fr->pos+tlen] = fr->sc[i+fr->pos]; } tmp[olen+tlen] = '\0'; memcpy(fr->sc, tmp, fr->sc_len); |