projects
/
platform
/
upstream
/
nasm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afcb66f
)
disasm: Don't rely on iflag_cmp() returning +/-1
author
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 27 Nov 2013 21:43:45 +0000
(13:43 -0800)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 27 Nov 2013 21:43:45 +0000
(13:43 -0800)
It is safer to just rely on the sign, for future options.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
disasm.c
patch
|
blob
|
history
diff --git
a/disasm.c
b/disasm.c
index
b7c5027
..
bb53b4c
100644
(file)
--- a/
disasm.c
+++ b/
disasm.c
@@
-1338,7
+1338,8
@@
int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
if (tmp_ins.prefixes[i])
nprefix++;
if (nprefix < best_pref ||
- (nprefix == best_pref && iflag_cmp(&goodness, &best) == -1)) {
+ (nprefix == best_pref &&
+ iflag_cmp(&goodness, &best) < 0)) {
/* This is the best one found so far */
best = goodness;
best_p = p;