summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2012-03-20 22:46:11 +0100
committerFrancisco Jerez <[email protected]>2012-05-11 12:39:43 +0200
commit2faf01c8403514dda15ab8b1a2309d5529dd06ba (patch)
tree0c106eff863729270360b675dc46908458aa3a27 /src/gallium/auxiliary
parent40123dae4371ab62530d15020ca97208e206d359 (diff)
gallium/tgsi/text: Replace open-coded integer parsing with parse_int().
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index c38adeb931c..279a046e202 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -466,24 +466,10 @@ parse_register_bracket(
eat_opt_white(&ctx->cur);
}
- if (*ctx->cur == '+' || *ctx->cur == '-') {
- boolean negate;
-
- negate = *ctx->cur == '-';
- ctx->cur++;
- eat_opt_white( &ctx->cur );
- if (!parse_uint( &ctx->cur, &uindex )) {
- report_error( ctx, "Expected literal unsigned integer" );
- return FALSE;
- }
- if (negate)
- brackets->index = -(int) uindex;
- else
- brackets->index = (int) uindex;
- }
- else {
+ if (*ctx->cur == '+' || *ctx->cur == '-')
+ parse_int( &ctx->cur, &brackets->index );
+ else
brackets->index = 0;
- }
}
else {
if (!parse_uint( &ctx->cur, &uindex )) {