From d2f18015169e9981f82fb520af9532e1dbccecf3 Mon Sep 17 00:00:00 2001 From: Yu-Chin Date: Tue, 14 Oct 2014 00:13:36 +0800 Subject: [PATCH] replace long int with size_t in linear.cpp and train.c --- linear.cpp | 4 ++-- train.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linear.cpp b/linear.cpp index 6efbf10..52d6700 100644 --- a/linear.cpp +++ b/linear.cpp @@ -2051,8 +2051,8 @@ static void transpose(const problem *prob, feature_node **x_space_ret, problem * int i; int l = prob->l; int n = prob->n; - long int nnz = 0; - long int *col_ptr = new long int [n+1]; + size_t nnz = 0; + size_t *col_ptr = new size_t [n+1]; feature_node *x_space; prob_col->l = l; prob_col->n = n; diff --git a/train.c b/train.c index d388175..80d9810 100644 --- a/train.c +++ b/train.c @@ -300,7 +300,7 @@ void parse_command_line(int argc, char **argv, char *input_file_name, char *mode void read_problem(const char *filename) { int max_index, inst_max_index, i; - long int elements, j; + size_t elements, j; FILE *fp = fopen(filename,"r"); char *endptr; char *idx, *val, *label; -- 2.40.0