Opcodes are raw bytes, they shouldn't be added
using build_append_int. This only happens to work
with 0 and 1 opcodes.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
switch (seg_count) {
case 1:
if (!*s) {
- build_append_byte(array, 0x0); /* NullName */
+ build_append_byte(array, 0x00); /* NullName */
} else {
build_append_nameseg(array, s);
}
Aml *var = aml_opcode(0x7B /* AndOp */);
aml_append(var, arg1);
aml_append(var, arg2);
- build_append_int(var->buf, 0x00 /* NullNameOp */);
+ build_append_byte(var->buf, 0x00 /* NullNameOp */);
return var;
}
Aml *var = aml_opcode(0x93 /* LequalOp */);
aml_append(var, arg1);
aml_append(var, arg2);
- build_append_int(var->buf, 0x00); /* NullNameOp */
+ build_append_byte(var->buf, 0x00); /* NullNameOp */
return var;
}