summaryrefslogtreecommitdiff
path: root/blkparse_fmt.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-09-29 12:01:37 +0200
committerJens Axboe <axboe@suse.de>2005-09-29 12:01:37 +0200
commite820abd79354e5b8596e1ec8105ffe36d36f9c20 (patch)
tree081c1c71d1f5c97443d0b29a792ab81b20e9fc3b /blkparse_fmt.c
parentcf4b68a59f5b5a7758d9e58b54edd9e59554d23e (diff)
downloadblktrace-e820abd79354e5b8596e1ec8105ffe36d36f9c20.tar.gz
blktrace-e820abd79354e5b8596e1ec8105ffe36d36f9c20.tar.bz2
[PATCH] Assorted compiler warnings
Diffstat (limited to 'blkparse_fmt.c')
-rw-r--r--blkparse_fmt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/blkparse_fmt.c b/blkparse_fmt.c
index ebf97c6..30bab91 100644
--- a/blkparse_fmt.c
+++ b/blkparse_fmt.c
@@ -21,16 +21,16 @@ static inline int valid_spec(int spec)
return strchr(VALID_SPECS, spec) != NULL;
}
-void set_all_format_specs(char *optarg)
+void set_all_format_specs(char *option)
{
char *p;
for (p = VALID_SPECS; *p; p++)
if (override_format[(int)(*p)] == NULL)
- override_format[(int)(*p)] = strdup(optarg);
+ override_format[(int)(*p)] = strdup(option);
}
-int add_format_spec(char *optarg)
+int add_format_spec(char *option)
{
int spec = optarg[0];
@@ -39,12 +39,12 @@ int add_format_spec(char *optarg)
return 1;
}
if (optarg[1] != ',') {
- fprintf(stderr,"Bad format specifier - need ',' %s\n", optarg);
+ fprintf(stderr,"Bad format specifier - need ',' %s\n", option);
return 1;
}
- optarg += 2;
- if (*optarg == '\0') {
- fprintf(stderr,"Bad format specifier - need fmt %s\n", optarg);
+ option += 2;
+ if (*option == '\0') {
+ fprintf(stderr,"Bad format specifier - need fmt %s\n", option);
return 1;
}
@@ -52,10 +52,10 @@ int add_format_spec(char *optarg)
* Set both merges (front and back)
*/
if (spec == 'M') {
- override_format['B'] = strdup(optarg);
- override_format['M'] = strdup(optarg);
+ override_format['B'] = strdup(option);
+ override_format['M'] = strdup(option);
} else
- override_format[spec] = strdup(optarg);
+ override_format[spec] = strdup(option);
return 0;
}