-Werror,-Wtautological-pointer-compare
(/usr/include/sys/stat.h annotates __lxstat params as __nonnull) Change-Id: I4297c4a05f54bc35688b65dd1ddcdeb7bc7fc37b
This commit is contained in:
parent
f66cbdb948
commit
077ad1a5ab
@ -17,6 +17,7 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -122,11 +123,9 @@ int __lxstat(int n, const char *path, struct stat *buf)
|
|||||||
p_lstat = (int (*)(int n, const char *path, struct stat *buf))
|
p_lstat = (int (*)(int n, const char *path, struct stat *buf))
|
||||||
dlsym (RTLD_NEXT, "__lxstat");
|
dlsym (RTLD_NEXT, "__lxstat");
|
||||||
ret = (*p_lstat)(n, path, buf);
|
ret = (*p_lstat)(n, path, buf);
|
||||||
if (buf != NULL)
|
assert(buf != NULL);
|
||||||
{
|
buf->st_uid = 0; /* root */
|
||||||
buf->st_uid = 0; /* root */
|
buf->st_gid = 0; /* root */
|
||||||
buf->st_gid = 0; /* root */
|
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user