diff options
author | Michal Krol <[email protected]> | 2009-11-10 03:08:21 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-11-10 03:08:21 +0100 |
commit | e44c77028c2964891943e4235e44d93c559de088 (patch) | |
tree | 7d36ded09d7d78283eb7a1b7ec63dd747a0cfd21 /src/gallium/auxiliary | |
parent | 83760d961fbaeaca8ab82ae497b26e90691f7654 (diff) |
tgsi/ureg: Simplify logic in tokens_expand().
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 4731e3bde84..3f752e9352f 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -140,8 +140,9 @@ static void tokens_expand( struct ureg_tokens *tokens, { unsigned old_size = tokens->size * sizeof(unsigned); - if (tokens->tokens == error_tokens) - goto fail; + if (tokens->tokens == error_tokens) { + return; + } while (tokens->count + count > tokens->size) { tokens->size = (1 << ++tokens->order); @@ -150,13 +151,9 @@ static void tokens_expand( struct ureg_tokens *tokens, tokens->tokens = REALLOC(tokens->tokens, old_size, tokens->size * sizeof(unsigned)); - if (tokens->tokens == NULL) - goto fail; - - return; - -fail: - tokens_error(tokens); + if (tokens->tokens == NULL) { + tokens_error(tokens); + } } static void set_bad( struct ureg_program *ureg ) |