]> granicus.if.org Git - liblinear/commitdiff
Because model_ is a global variable, do_predict(input, output, model_)
authorpopo <popo@16e7d947-dcc2-db11-b54a-0017319806e7>
Tue, 10 Apr 2012 04:28:19 +0000 (04:28 +0000)
committerpopo <popo@16e7d947-dcc2-db11-b54a-0017319806e7>
Tue, 10 Apr 2012 04:28:19 +0000 (04:28 +0000)
does not need the third argument.

predict.c

index 9c3a9ab79ec09d6a528b0301242afefbd9a5fb63..c53f3adc6699261eb2d73e8da6e67a12a8d51cc5 100644 (file)
--- a/predict.c
+++ b/predict.c
@@ -38,7 +38,7 @@ static char* readline(FILE *input)
        return line;
 }
 
-void do_predict(FILE *input, FILE *output, struct model* model_)
+void do_predict(FILE *input, FILE *output)
 {
        int correct = 0;
        int total = 0;
@@ -207,7 +207,7 @@ int main(int argc, char **argv)
        }
 
        x = (struct feature_node *) malloc(max_nr_attr*sizeof(struct feature_node));
-       do_predict(input, output, model_);
+       do_predict(input, output);
        free_and_destroy_model(&model_);
        free(line);
        free(x);