bytecode: various changes from code review

pull/69/head
Kevin Lin 11 years ago
parent 0b28c74878
commit 7c9c4fab22
  1. 8
      libclamav/bytecode.c

@ -3100,7 +3100,6 @@ static void cli_bytetype_helper(const struct cli_bc *bc, unsigned tid)
unsigned i, j;
const struct cli_bc_type *ty;
if (tid & 0x8000) {
printf("alloc ");
tid &= 0x7fff;
@ -3112,7 +3111,10 @@ static void cli_bytetype_helper(const struct cli_bc *bc, unsigned tid)
}
i = tid - 65;
if (i >= bc->num_types) {
printf("invaltype");
return;
}
ty = &bc->types[i];
switch (ty->kind) {
@ -3229,7 +3231,7 @@ void cli_byteinst_describe(const struct cli_bc_inst *inst, unsigned *bbnum)
return;
}
snprintf(inst_str, 256, "%-20s[%-3d/%3d/%3d]", bc_opstr[inst->opcode],
snprintf(inst_str, sizeof(inst_str), "%-20s[%-3d/%3d/%3d]", bc_opstr[inst->opcode],
inst->opcode, inst->interp_op, inst->interp_op%inst->opcode);
printf("%-35s", inst_str);
switch (inst->opcode) {

Loading…
Cancel
Save