projects
/
quix0rs-blobwars.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73c896b
)
Check return value of chdir
author
Hans de Goede
<hdegoede@redhat.com>
Fri, 22 Apr 2011 17:56:00 +0000
(19:56 +0200)
committer
Hans de Goede
<hdegoede@redhat.com>
Fri, 22 Apr 2011 17:56:09 +0000
(19:56 +0200)
Not checking this causes a warning when building under Fedora which becomes
an error because of -Werror.
src/main.cpp
patch
|
blob
|
history
diff --git
a/src/main.cpp
b/src/main.cpp
index e24da3195cd9368f02db07b14e52084112ea6be9..c5e9ba84954eafd151d7a51a5ee294aa0cceb79f 100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-104,7
+104,11
@@
int main(int argc, char *argv[])
#endif
#if RELEASE
- chdir(PAKLOCATION);
+ if (chdir(PAKLOCATION))
+ {
+ perror("Could not chdir to " PAKLOCATION ":");
+ return 1;
+ }
#endif
config.engine = &engine;