simplify code copying @mnemonic in fill_insn()

v2
Nguyen Anh Quynh 11 years ago
parent 22ea683583
commit d392f6ef89
  1. 10
      cs.c

10
cs.c

@ -278,7 +278,6 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI
// find first space or tab
sp = buffer;
mnem = insn->mnemonic;
if (mci->csh->arch == CS_ARCH_X86 && mci->x86_prefix[0]) {
for (sp = buffer; *sp; sp++) {
if (*sp == ' '|| *sp == '\t')
break;
@ -288,15 +287,6 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI
*mnem = *sp;
mnem++;
}
} else {
for (sp = buffer; *sp; sp++) {
if (*sp == ' '|| *sp == '\t')
break;
// copy to @mnemonic
*mnem = *sp;
mnem++;
}
}
*mnem = '\0';

Loading…
Cancel
Save