char *c;
char *p;
s = parseInt(s, &i);
- if (!s || (i <= 0)) return 0;
- while (*s && (*s != '-')) s++;
+ if (!s || i <= 0) return 0;
+ while (*s && *s != '-') s++;
if (*s) s++;
else {
return 0;
}
c = N_NEW(i + 1, char);
p = c;
- while ((i > 0) && *s) {
+ while (i > 0 && *s) {
*p++ = *s++;
i--;
}
ops = (char*)(x->ops);
bufsz = initcnt + XDBSIZE;
ops = realloc(ops, bufsz * sz);
- memset(ops + (initcnt*sz), '\0', (bufsz - initcnt)*sz);
+ memset(ops + initcnt*sz, '\0', (bufsz - initcnt)*sz);
}
while ((s = parseOp(&op, s, fns, &error))) {
oldsz = bufsz;
bufsz *= 2;
ops = realloc(ops, bufsz * sz);
- memset(ops + (oldsz*sz), '\0', (bufsz - oldsz)*sz);
+ memset(ops + oldsz*sz, '\0', (bufsz - oldsz)*sz);
}
- *(xdot_op *) (ops + (x->cnt * sz)) = op;
+ *(xdot_op *) (ops + x->cnt * sz) = op;
x->cnt++;
}
if (error)
char *base = (char *) (x->ops);
for (i = 0; i < x->cnt; i++) {
op = (xdot_op *) (base + i * x->sz);
- ofn(op, print, info, (i < x->cnt - 1));
+ ofn(op, print, info, i < x->cnt - 1);
}
}