summaryrefslogtreecommitdiff
path: root/benchmarks/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/main.c')
-rw-r--r--benchmarks/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/benchmarks/main.c b/benchmarks/main.c
index df8298f..3d98a05 100644
--- a/benchmarks/main.c
+++ b/benchmarks/main.c
@@ -24,7 +24,10 @@ int main (int argc, char *argv[])
char *progname = argv[0];
if(lastslash) {
*lastslash = '\0';
- chdir(argv[0]);
+ if(chdir(argv[0]) < 0) {
+ fprintf(stderr, "Error changing directory to %s.\n", argv[0]);
+ return 1;
+ }
*lastslash = '/';
progname = lastslash + 3; /* "/b_" */
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback