summaryrefslogtreecommitdiff
path: root/t/t4051/hello.c
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2017-01-28 22:41:47 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-30 14:23:00 -0800
commit402bf8e19832142de97d84d37c51262d91e5f2db (patch)
tree6cf29f8b648cdd74c7fa58b2f159e603670ed46a /t/t4051/hello.c
parentuse SWAP macro (diff)
downloadtgif-402bf8e19832142de97d84d37c51262d91e5f2db.tar.xz
diff: use SWAP macro
Use the macro SWAP to exchange the value of pairs of variables instead of swapping them manually with the help of a temporary variable. The resulting code is shorter and easier to read. The two cases were not transformed by the semantic patch swap.cocci because it's extra careful and handles only cases where the types of all variables are the same -- and here we swap two ints and use an unsigned temporary variable for that. Nevertheless the conversion is safe, as the value range is preserved with and without the patch. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4051/hello.c')
0 files changed, 0 insertions, 0 deletions