Skip to content

Commit d1cbd63

Browse files
committed
Less silly shell code.
1 parent cd6170d commit d1cbd63

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

tests/test.sh

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,32 +65,16 @@ fi
6565
has_feature() {
6666
case $d in
6767
asan)
68-
if test -n "$ASAN_PRELOAD"; then
69-
return 0
70-
else
71-
return 1
72-
fi
68+
test -n "$ASAN_PRELOAD"
7369
;;
7470
bsd)
75-
if uname | grep -q BSD; then
76-
return 0
77-
else
78-
return 1
79-
fi
71+
uname | grep -q BSD
8072
;;
8173
netbsd)
82-
if uname | grep -q NetBSD; then
83-
return 0
84-
else
85-
return 1
86-
fi
74+
uname | grep -q NetBSD
8775
;;
8876
syslog)
89-
if test -r /var/log/syslog || which journalctl > /dev/null; then
90-
return 0
91-
else
92-
return 1
93-
fi
77+
test -r /var/log/syslog || which journalctl > /dev/null
9478
;;
9579
*)
9680
echo >&2 "$t: unknown feature: $d"

0 commit comments

Comments
 (0)