[PATCH] More string fixups
authorJens Axboe <axboe@suse.de>
Tue, 30 May 2006 12:29:32 +0000 (14:29 +0200)
committerJens Axboe <axboe@suse.de>
Tue, 30 May 2006 12:29:32 +0000 (14:29 +0200)
fio-ini.c

index 540902fee58d1e3ad51e165c18a983fd314f26fe..fc0d5eef54e0be4c056ede2f8f22234244708b8f 100644 (file)
--- a/fio-ini.c
+++ b/fio-ini.c
@@ -486,6 +486,9 @@ static int check_int(char *p, char *name, unsigned int *val)
 {
        char *str;
 
 {
        char *str;
 
+       if (strncmp(p, name, strlen(name)))
+               return 1;
+
        str = strstr(p, name);
        if (!str)
                return 1;
        str = strstr(p, name);
        if (!str)
                return 1;
@@ -669,6 +672,7 @@ int parse_jobs_ini(char *file)
                                continue;
                        if (strstr(p, "["))
                                break;
                                continue;
                        if (strstr(p, "["))
                                break;
+                       strip_blank_front(&p);
                        strip_blank_end(p);
 
                        if (!check_int(p, "prio", &prio)) {
                        strip_blank_end(p);
 
                        if (!check_int(p, "prio", &prio)) {