src/utils.c
@@ -18,8 +18,6 @@ c = next+1; } c = copy_string(c); next = strchr(c, '_'); if (next) *next = 0; next = strchr(c, '.'); if (next) *next = 0; return c; @@ -73,11 +71,11 @@ void top_k(float *a, int n, int k, int *index) { int i,j; for(j = 0; j < k; ++j) index[j] = 0; for(j = 0; j < k; ++j) index[j] = -1; for(i = 0; i < n; ++i){ int curr = i; for(j = 0; j < k; ++j){ if(a[curr] > a[index[j]]){ if((index[j] < 0) || a[curr] > a[index[j]]){ int swap = curr; curr = index[j]; index[j] = swap;