Permalink
Browse files

Refactor for simplicity.

  • Loading branch information...
1 parent fbc87b2 commit f7c832241a410f13411b9d96bb0031cb06db5cc1 @kr committed Nov 22, 2008
Showing with 2 additions and 10 deletions.
  1. +0 −6 pq.c
  2. +0 −2 pq.h
  3. +2 −2 prot.c
View
6 pq.c
@@ -180,9 +180,3 @@ pq_remove(pq q, job j)
return j;
}
-
-unsigned int
-pq_used(pq q)
-{
- return q->used;
-}
View
2 pq.h
@@ -47,6 +47,4 @@ job pq_peek(pq q);
/* remove and return j if the queue contains j, else return NULL */
job pq_remove(pq q, job j);
-unsigned int pq_used(pq q);
-
#endif /*q_h*/
View
4 prot.c
@@ -510,7 +510,7 @@ get_delayed_job_ct()
for (i = 0; i < tubes.used; i++) {
t = tubes.items[i];
- count += pq_used(&t->delay);
+ count += t->delay.used;
}
return count;
}
@@ -953,7 +953,7 @@ fmt_stats_tube(char *buf, size_t size, tube t)
t->stat.urgent_ct,
t->ready.used,
t->stat.reserved_ct,
- pq_used(&t->delay),
+ t->delay.used,
t->stat.buried_ct,
t->stat.total_jobs_ct,
t->using_ct,

0 comments on commit f7c8322

Please sign in to comment.