chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
fc5023c
)
basic/strv: use SWAP_TWO() macro (#3602)
author
0xAX
<0xAX@users.noreply.github.com>
Sun, 26 Jun 2016 10:37:00 +0000
(13:37 +0300)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000
(10:13 +0200)
src/basic/strv.c
patch
|
blob
|
history
diff --git
a/src/basic/strv.c
b/src/basic/strv.c
index 93bb130eaf5c9f6a615c7ba3dbac79e8d373a2d2..ba4d697b106959cc6054992ad11c7f374bb564a5 100644
(file)
--- a/
src/basic/strv.c
+++ b/
src/basic/strv.c
@@
-817,11
+817,7
@@
char **strv_reverse(char **l) {
return l;
for (i = 0; i < n / 2; i++) {
- char *t;
-
- t = l[i];
- l[i] = l[n-1-i];
- l[n-1-i] = t;
+ SWAP_TWO(l[i], l[n-1-i]);
}
return l;