summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-05-17 00:00:01 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-05-17 00:00:01 +0300
commitc52fbcd8e90313764cabadf823d500704b8cc980 (patch)
treeab8391b46ac1d73a47a1d498e6915086c07d15cc
parent07ff1da6ae0728fa2f7bbf5d0e188e986344a0db (diff)
parentf1bdc6b187836f9741ac0512a0f10414002c647d (diff)
downloadminetest-c52fbcd8e90313764cabadf823d500704b8cc980.tar.gz
minetest-c52fbcd8e90313764cabadf823d500704b8cc980.tar.bz2
minetest-c52fbcd8e90313764cabadf823d500704b8cc980.zip
merged fix to readlink ignored return value warning
-rw-r--r--src/porting.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/porting.cpp b/src/porting.cpp
index e8b135255..7c7ce48ea 100644
--- a/src/porting.cpp
+++ b/src/porting.cpp
@@ -136,7 +136,7 @@ void initializePaths()
char buf[BUFSIZ];
memset(buf, 0, BUFSIZ);
// Get path to executable
- readlink("/proc/self/exe", buf, BUFSIZ-1);
+ assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1);
pathRemoveFile(buf, '/');
@@ -200,7 +200,7 @@ void initializePaths()
char buf[BUFSIZ];
memset(buf, 0, BUFSIZ);
// Get path to executable
- readlink("/proc/self/exe", buf, BUFSIZ-1);
+ assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1);
pathRemoveFile(buf, '/');