summary refs log tree commit diff
path: root/util.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-01 10:41:53 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-01 10:41:53 -0400
commite7825e70d532d16f1598eaa598342af373716418 (patch)
treed29fa3899d7d141da8fe91ee5ae1cd252b3d7e7b /util.c
parent6a2c88054318290f4b4aeb6f24d710a3f99c6415 (diff)
downloadroux-e7825e70d532d16f1598eaa598342af373716418.tar.gz
tradeoff the type of bsiter()
int is used all over the place for temporaries,
maybe this should be changed, I don't know.

Another thing to consider is that temporaries
are currently on 12 bits (and will be on 29
or 30 bits in the future), so int will always be
safe to store them.  We just loose the free
invariant of non-negativity.
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 238c996..fb85dc1 100644
--- a/util.c
+++ b/util.c
@@ -313,7 +313,7 @@ bszero(BSet *bs)
  *
  */
 int
-bsiter(BSet *bs, uint *elt)
+bsiter(BSet *bs, int *elt)
 {
 	uint i;
 
@@ -332,7 +332,7 @@ bsiter(BSet *bs, uint *elt)
 void
 dumpts(BSet *bs, Tmp *tmp, FILE *f)
 {
-	uint t;
+	int t;
 
 	fprintf(f, "[");
 	for (t=Tmp0; bsiter(bs, &t); t++)