static char *act_to_str(__u32 action)
{
static char buf[1024];
- int i;
- int act = action & 0xffff;
- int trace = (action >> BLK_TC_SHIFT) & 0xffff;
+ unsigned int i;
+ unsigned int act = action & 0xffff;
+ unsigned int trace = (action >> BLK_TC_SHIFT) & 0xffff;
if (act <= N_ACTS) {
sprintf(buf, "%s ", acts[act].string);
MINOR(bit->device));
}
-static int process(FILE *ofp, char *file, int cpu)
+static int process(FILE *ofp, char *file, unsigned int cpu)
{
# define SWAP_BITS() do { \
if (bit_save) { \
pdu_buf = malloc(bit->pdu_len);
n = fread(pdu_buf, bit->pdu_len, 1, ifp);
- if (n <= 0) {
+ if (n == 0) {
INC_BAD("bad pdu");
nbad_seq++;
break;
SWAP_BITS();
}
- if (n < 0)
+ if (n == 0)
fprintf(stderr,"%s: fread failed %d/%s\n",
file, errno, strerror(errno));
fclose(ifp);