Patchwork tcg: Remove unneeded assertion

login
register
mail settings
Submitter Stefan Weil
Date Dec. 30, 2012, 7:20 a.m.
Message ID <1356852013-12955-1-git-send-email-sw@weilnetz.de>
Download mbox | patch
Permalink /patch/208734/
State Accepted
Headers show

Comments

Stefan Weil - Dec. 30, 2012, 7:20 a.m.
Commit 7f6f0ae5b95adfa76e10eabe2c34424a955fd10c added two assertions.

One of these assertions is not needed:
The pointer ts is never NULL because it is initialized with the
address of an array element.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 tcg/tcg.c |    1 -
 1 file changed, 1 deletion(-)
Richard Henderson - Dec. 31, 2012, 6:12 p.m.
On 2012-12-29 23:20, Stefan Weil wrote:
> Commit 7f6f0ae5b95adfa76e10eabe2c34424a955fd10c added two assertions.
> 
> One of these assertions is not needed:
> The pointer ts is never NULL because it is initialized with the
> address of an array element.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>

Reviewed-by: Richard Henderson <rth@twiddle.net>

r~

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index ede51a3..9275e37 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -800,7 +800,6 @@  static char *tcg_get_arg_str_idx(TCGContext *s, char *buf, int buf_size,
 
     assert(idx >= 0 && idx < s->nb_temps);
     ts = &s->temps[idx];
-    assert(ts);
     if (idx < s->nb_globals) {
         pstrcpy(buf, buf_size, ts->name);
     } else {