Permalink
Browse files

fix compile warning in check_parents function

main.c: In function ‘check_parents’:
main.c:516: warning: ignoring return value of ‘fchdir’, declared with attribute warn_unused_result
  • Loading branch information...
1 parent 7c58cce commit bb225485454dd8ab7f64d8c8da4a99946eb2ab7a @avsej avsej committed Aug 23, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 main.c
View
5 main.c
@@ -513,7 +513,10 @@ int check_parents(char* name)
break;
}
}
- fchdir(cwd);
+ if (fchdir(cwd) < 0) {
+ perror("cannot chdir back");
+ exit(1);
+ }
return rv;
}

0 comments on commit bb22548

Please sign in to comment.