From f0ba48b629c6eefbaea4cd7b9ee35ba2aa18d865 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 9 May 2016 21:20:37 +0200 Subject: remove all unnecessary allocation checks --- src/gensvm_pred.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/gensvm_pred.c') diff --git a/src/gensvm_pred.c b/src/gensvm_pred.c index 7835bf6..25a4cc5 100644 --- a/src/gensvm_pred.c +++ b/src/gensvm_pred.c @@ -46,23 +46,8 @@ void gensvm_predict_labels(struct GenData *testdata, struct GenModel *model, // allocate necessary memory S = Calloc(double, K-1); - if (S == NULL) { - fprintf(stderr, "Failed to allocate memory for S in " - "gensvm_predict_labels.\n"); - exit(1); - } ZV = Calloc(double, n*(K-1)); - if (ZV == NULL) { - fprintf(stderr, "Failed to allocate memory for ZV in " - "gensvm_predict_labels.\n"); - exit(1); - } U = Calloc(double, K*(K-1)); - if (U == NULL) { - fprintf(stderr, "Failed to allocate memory for U in " - "gensvm_predict_labels.\n"); - exit(1); - } // Generate the simplex matrix gensvm_simplex_gen(K, U); -- cgit v1.2.3