diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /scripts/kallsyms.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'scripts/kallsyms.c')
-rw-r--r-- | scripts/kallsyms.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index e3902fb39afd..487ac6f37ca2 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -107,12 +107,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) | |||
107 | 107 | ||
108 | rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str); | 108 | rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str); |
109 | if (rc != 3) { | 109 | if (rc != 3) { |
110 | if (rc != EOF) { | 110 | if (rc != EOF && fgets(str, 500, in) == NULL) |
111 | /* skip line. sym is used as dummy to | 111 | fprintf(stderr, "Read error or end of file.\n"); |
112 | * shut of "warn_unused_result" warning. | ||
113 | */ | ||
114 | sym = fgets(str, 500, in); | ||
115 | } | ||
116 | return -1; | 112 | return -1; |
117 | } | 113 | } |
118 | 114 | ||
@@ -504,6 +500,8 @@ static void optimize_result(void) | |||
504 | 500 | ||
505 | /* find the token with the breates profit value */ | 501 | /* find the token with the breates profit value */ |
506 | best = find_best_token(); | 502 | best = find_best_token(); |
503 | if (token_profit[best] == 0) | ||
504 | break; | ||
507 | 505 | ||
508 | /* place it in the "best" table */ | 506 | /* place it in the "best" table */ |
509 | best_table_len[i] = 2; | 507 | best_table_len[i] = 2; |