diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-02-15 12:54:19 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-02-15 12:54:19 -0800 |
| commit | cbf1860d73b782e7924e63361df485b31225a26a (patch) | |
| tree | a86ce71a399fb8153be1552f08e51c58b2c5b5cf /prio-queue.c | |
| parent | 2f4e87d7777a0bcffa8a7cc3cc52e1e8b2c352ff (diff) | |
| parent | 9e2edd66dda418dad751d5eb2e5921e05e57cd30 (diff) | |
| download | git-cbf1860d73b782e7924e63361df485b31225a26a.tar.gz | |
Merge branch 'rs/swap'
Code clean-up.
* rs/swap:
graph: use SWAP macro
diff: use SWAP macro
use SWAP macro
apply: use SWAP macro
add SWAP macro
Diffstat (limited to 'prio-queue.c')
| -rw-r--r-- | prio-queue.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/prio-queue.c b/prio-queue.c index e4365b00d6..17252d231b 100644 --- a/prio-queue.c +++ b/prio-queue.c @@ -12,9 +12,7 @@ static inline int compare(struct prio_queue *queue, int i, int j) static inline void swap(struct prio_queue *queue, int i, int j) { - struct prio_queue_entry tmp = queue->array[i]; - queue->array[i] = queue->array[j]; - queue->array[j] = tmp; + SWAP(queue->array[i], queue->array[j]); } void prio_queue_reverse(struct prio_queue *queue) |
