summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-06-23 17:39:33 +0200
committerPali Rohár <pali.rohar@gmail.com>2012-06-23 17:39:33 +0200
commit027a6d9a18b8767969127ffc1c4a734fec4b840b (patch)
treeea5d137bb5e15e3d818032cb4ed7798de7c33026 /src/main.c
parent58c0dbe2753753e2eff5e27f98453aa8a020235f (diff)
download0xFFFF-027a6d9a18b8767969127ffc1c4a734fec4b840b.tar.bz2
Fix compilation warnings
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index b2196a6..67f78a7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -517,8 +517,12 @@ int main(int argc, char **argv)
}
if (unpack) {
- if (reverseto)
- chdir(reverseto);
+ if (reverseto) {
+ if (chdir(reverseto) < 0) {
+ printf("Error: Cannot change directory to %s\n", reverseto);
+ return 1;
+ }
+ }
unpack_fiasco_image(fiasco_image);
return 0;
}