socket-test: Refactor if check into the assert

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
Bryce Harrington 2015-12-07 22:49:14 -08:00
parent 69a5a6d16c
commit 2b236af9b7

View file

@ -47,8 +47,7 @@ static const char *
require_xdg_runtime_dir(void)
{
char *val = getenv("XDG_RUNTIME_DIR");
if (!val)
assert(0 && "set $XDG_RUNTIME_DIR to run this test");
assert(val && "set $XDG_RUNTIME_DIR to run this test");
return val;
}