diff options
author | Harout Hedeshian <harouth@codeaurora.org> | 2015-06-02 15:01:49 -0600 |
---|---|---|
committer | Harout Hedeshian <harouth@codeaurora.org> | 2015-06-11 16:03:26 -0600 |
commit | 3b47d981337933112726a656a724b9dfd4651852 (patch) | |
tree | ec714a67bd12bf16f55b3471584c26334c3b5dc7 | |
parent | e21de8dcb916d32b8dcce6d6316603811bbc408b (diff) | |
download | android_vendor_qcom_opensource_dataservices-3b47d981337933112726a656a724b9dfd4651852.tar.gz android_vendor_qcom_opensource_dataservices-3b47d981337933112726a656a724b9dfd4651852.tar.bz2 android_vendor_qcom_opensource_dataservices-3b47d981337933112726a656a724b9dfd4651852.zip |
datatop: remove unused variables
Removed unused variables in dtop_stat_search in datatop_stat_poll.c
and get_number_of_values in datatop_gen_poll.c because it was not
compiling with newer GCC revisions.
Change-Id: Icd8316b0e9bf5070762a18aa1ab65859b31dba5d
-rw-r--r-- | datatop/src/datatop_gen_poll.c | 4 | ||||
-rw-r--r-- | datatop/src/datatop_stat_poll.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/datatop/src/datatop_gen_poll.c b/datatop/src/datatop_gen_poll.c index 457cc35..c3eb09d 100644 --- a/datatop/src/datatop_gen_poll.c +++ b/datatop/src/datatop_gen_poll.c @@ -69,6 +69,10 @@ static int get_number_of_values(struct dtop_data_point_gatherer *dpg) read = dt_read_file(dpg->file, &data, DTOP_GEN_SIZE); line_len = dt_read_line(line, DTOP_GEN_LINE, data, DTOP_GEN_SIZE, 0); + if (read == 0) { + return 0; + } + if (line_len < 1) { dt_free(&data); return 0; diff --git a/datatop/src/datatop_stat_poll.c b/datatop/src/datatop_stat_poll.c index 3eadaeb..88320b5 100644 --- a/datatop/src/datatop_stat_poll.c +++ b/datatop/src/datatop_stat_poll.c @@ -219,7 +219,7 @@ static void construct_stat_file_dpg(struct dtop_data_point */ int dtop_stat_search(struct dtop_stat_vars *storage) { - int i, k, n, sum; + int i, n, sum; char *data; int *line_len = malloc(sizeof(int) * storage->line_count); int read; @@ -297,7 +297,6 @@ int dtop_stat_search(struct dtop_stat_vars *storage) count++; } } - k = 0; /* Calls dpg constructor, dpg will point to the dp struct */ construct_stat_file_dpg(data_points, storage, dp_count); |