diff options
| author | June McEnroe <june@causal.agency> | 2020-04-03 17:10:52 -0400 |
|---|---|---|
| committer | June McEnroe <june@causal.agency> | 2020-04-03 17:10:52 -0400 |
| commit | 75a6aa9258270169f43f56e063f1bfb57eebe56b (patch) | |
| tree | 7db2ed9792116bf47541a02829d00da2adccb2ef /complete.c | |
| parent | Only treat /open param as count if single digit (diff) | |
| download | catgirl-75a6aa9258270169f43f56e063f1bfb57eebe56b.tar.gz catgirl-75a6aa9258270169f43f56e063f1bfb57eebe56b.zip | |
Use gnu-case-range and gnu-conditional-omitted-operand extensions
I'm sad to do this but I just can't stand writing (foo ? foo : bar) anymore.
Diffstat (limited to '')
| -rw-r--r-- | complete.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/complete.c b/complete.c index ad9bfd7..d23932c 100644 --- a/complete.c +++ b/complete.c @@ -60,7 +60,7 @@ static struct Node *prepend(struct Node *node) { node->next = head; if (head) head->prev = node; head = node; - if (!tail) tail = node; + tail = (tail ?: node); return node; } @@ -69,7 +69,7 @@ static struct Node *append(struct Node *node) { node->prev = tail; if (tail) tail->next = node; tail = node; - if (!head) head = node; + head = (head ?: node); return node; } |