inline int compare_mask_map(struct mask_map *mmp, char *string)
{
- int i;
- char *s, *ustring = strdup(string);
+ int i, result;
+ char *s, *ustring = strdup(string);
- for (i = 0, s = ustring; i < strlen(ustring); i++, s++)
- *s = toupper(*s);
+ for (i = 0, s = ustring; i < strlen(ustring); i++, s++)
+ *s = toupper(*s);
- return !strcmp(mmp->short_form, ustring) ||
- !strcmp(mmp->long_form, ustring);
+ result = !strcmp(mmp->short_form, ustring) ||
+ !strcmp(mmp->long_form, ustring);
+ free(ustring);
+ return result;
}
int find_mask_map(char *string)
{
struct thread_information *tip = arg;
int tracefd, ret, ofd, pdu_len;
- char ip[64], op[64], dp[64];
+ char ip[64], op[64];
struct blk_io_trace t;
pid_t pid = getpid();
cpu_set_t cpu_mask;
}
if (pdu_len)
- extract_data(tip->cpu, ip, tracefd, dp, ofd, pdu_len);
+ extract_data(tip->cpu, ip, tracefd, op, ofd, pdu_len);
tip->events_processed++;
}
stop_threads();
stop_trace();
- close(devfd);
show_stats();
return 0;