Skip to content
Permalink
Browse files

eml_bayes: Fix missing precondition

Bug caught by scan-build, only one reported
  • Loading branch information...
jonnor committed Feb 23, 2019
1 parent 1729e62 commit 67f59970e15c15b923747d21b0d95ddd67ea887d
Showing with 1 addition and 0 deletions.
  1. +1 −0 emlearn/eml_bayes.h
@@ -92,6 +92,7 @@ eml_bayes_predict(EmlBayesModel *model, const float values[], int32_t values_len

EML_PRECONDITION(model, -EmlUninitialized);
EML_PRECONDITION(values, -EmlUninitialized);
EML_PRECONDITION(model->n_classes >= 2, -EmlUninitialized);

const int MAX_CLASSES = 10;
eml_q16_t class_probabilities[MAX_CLASSES];

0 comments on commit 67f5997

Please sign in to comment.
You can’t perform that action at this time.