summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2009-03-19 18:19:42 +0530
committerAmit Shah <amit.shah@redhat.com>2009-03-19 18:19:42 +0530
commit7de1f286de85fd1e8359eee716536666a76fbb88 (patch)
tree821ccb5e0c8976efdb6ab4c87800a0c2fac3aa2c
parent3948b37e6d780460f9ef9c8ade2571f39a340df0 (diff)
downloadalloc-perf-7de1f286de85fd1e8359eee716536666a76fbb88.tar.gz
alloc-perf-7de1f286de85fd1e8359eee716536666a76fbb88.tar.xz
alloc-perf-7de1f286de85fd1e8359eee716536666a76fbb88.zip
Fix segfault: filename has to be an array
Signed-off-by: Amit Shah <amit.shah@redhat.com>
-rw-r--r--Makefile2
-rw-r--r--test-file-zero-alloc-speed.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 482c49b..48509b9 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
# Author: Amit Shah <amit.shah@redhat.com>
CC = gcc
-CFLAGS = -Werror -Os
+CFLAGS = -Werror -g
.PHONY: all
diff --git a/test-file-zero-alloc-speed.c b/test-file-zero-alloc-speed.c
index 10c3a18..73a7975 100644
--- a/test-file-zero-alloc-speed.c
+++ b/test-file-zero-alloc-speed.c
@@ -58,7 +58,6 @@ int do_posix_fallocate(char *name, off_t len)
return 0;
}
-#if 1
int do_fallocate(char *name, off_t len)
{
int r, fd;
@@ -86,7 +85,6 @@ int do_fallocate(char *name, off_t len)
return 0;
}
-#endif
int do_mmap(char *name, off_t len)
{
@@ -168,7 +166,7 @@ int do_write_chunks(char *name, off_t len, size_t chunk_size)
int main(int argc, char **argv)
{
char *basename;
- char *filename;
+ char filename[200];
if (argc < 2) {
printf("usage: %s base-dir\n", argv[0]);