From 08476b7788530ff5ecb6eb379afc0a5998824f84 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 8 Jan 2015 14:04:37 +0100 Subject: -Werror,-Wtautological-pointer-compare Change-Id: I55db1220e234b92f5d0a3794f416154495da8b69 --- setup_native/scripts/source/getuid.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'setup_native') diff --git a/setup_native/scripts/source/getuid.c b/setup_native/scripts/source/getuid.c index d3660f4c7f7b..9a9f826fa3ab 100644 --- a/setup_native/scripts/source/getuid.c +++ b/setup_native/scripts/source/getuid.c @@ -137,11 +137,9 @@ int __lxstat64(int n, const char *path, struct stat64 *buf) p_lstat = (int (*)(int n, const char *path, struct stat64 *buf)) dlsym (RTLD_NEXT, "__lxstat64"); ret = (*p_lstat)(n, path, buf); - if (buf != NULL) - { - buf->st_uid = 0; - buf->st_gid = 0; - } + assert(buf != NULL); + buf->st_uid = 0; + buf->st_gid = 0; return ret; } #endif -- cgit