summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2002-04-29 00:59:35 +0000
committerkrw <krw@openbsd.org>2002-04-29 00:59:35 +0000
commit3000eb2b1d92527da1fdf0e2f71a08746969e0fb (patch)
tree5d8ff38d22452c3ae690751b8b7672d414412811 /lib/libc
parentwierd -> weird in comment (diff)
downloadwireguard-openbsd-3000eb2b1d92527da1fdf0e2f71a08746969e0fb.tar.xz
wireguard-openbsd-3000eb2b1d92527da1fdf0e2f71a08746969e0fb.zip
Rely on [] evaluating empty string as false, non-empty string as true
to eliminate a lot of -z and -n tests. Thus, '[ -z "$x" ] && cmd' -> '[ "$x" ] || cmd' 'if [ -z "$x" ]; then; y; fi' -> '[ "$x" ] || y'. '[ -n "$x" ]' -> '[ "$x" ]' Use variable default value syntax in a couple of places rather than if statements. e.g. ': ${_ouranswer:=$_ifs}'. Suggestions from millert@, aaron@, espie@, miod@ at various times.
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions