[PATCH] blkparse: can't return on-stack variables
authorJens Axboe <axboe@suse.de>
Fri, 23 Sep 2005 09:12:48 +0000 (11:12 +0200)
committerJens Axboe <axboe@suse.de>
Fri, 23 Sep 2005 09:12:48 +0000 (11:12 +0200)
Just make it static, access is serialized to it.

blkparse.c

index 3ebbcdb7f34788c5296ccd530786aaacfc31a73d..b5da1d105f69ac207c63f51712a6fdfe7627b0a9 100644 (file)
@@ -918,7 +918,7 @@ static char *fmt_select(int fmt_spec, struct blk_io_trace *t,
                        unsigned long long elapsed)
 {
        char *fmt;
-       char scratch_format[1024];
+       static char scratch_format[1024];
 
        if (override_format[fmt_spec] != NULL)
                return override_format[fmt_spec];