Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup cmp_ev_info

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14778 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
commit 0b50a80ab2335e54c42477f1a7be12402993422f 1 parent 3fe8311
Gabriel Scherer authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 byterun/backtrace.c
View
8 byterun/backtrace.c
@@ -207,9 +207,11 @@ struct ev_info {
};
static int cmp_ev_info(const void *a, const void *b) {
- if(((const struct ev_info*)a)->ev_pc > ((const struct ev_info*)b)->ev_pc)
- return 1;
- return -1;
+ code_t pc_a = ((const struct ev_info*)a)->ev_pc;
+ code_t pc_b = ((const struct ev_info*)b)->ev_pc;
+ if (pc_a > pc_b) return 1;
+ if (pc_a < pc_b) return -1;
+ return 0;
}
static char *read_debug_info_error = "";
Please sign in to comment.
Something went wrong with that request. Please try again.