Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@nyclamp.(none)>2014-03-31 19:51:01 +0400
committerJohn Langford <jl@nyclamp.(none)>2014-03-31 19:51:01 +0400
commitce8ffc8ff5821cc45f28739bc0889dc697dc8f98 (patch)
treefb0ef43ec0e37097dd156ae9b24d5295bb97b438 /vowpalwabbit/sender.cc
parent5023ab65297cc03427afc8ca3d2c7730383b633f (diff)
error check all calls to calloc
Diffstat (limited to 'vowpalwabbit/sender.cc')
-rw-r--r--vowpalwabbit/sender.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/vowpalwabbit/sender.cc b/vowpalwabbit/sender.cc
index 9658977f..d34c0d22 100644
--- a/vowpalwabbit/sender.cc
+++ b/vowpalwabbit/sender.cc
@@ -16,11 +16,10 @@
#include <netdb.h>
#endif
#include "io_buf.h"
-#include "parse_args.h"
#include "cache.h"
#include "simple_label.h"
#include "network.h"
-#include "vw.h"
+#include "reductions.h"
using namespace std;
using namespace LEARNER;
@@ -104,7 +103,7 @@ void end_examples(sender& s)
learner* setup(vw& all, po::variables_map& vm, vector<string> pairs)
{
- sender* s = (sender*)calloc(1,sizeof(sender));
+ sender* s = (sender*)calloc_or_die(1,sizeof(sender));
s->sd = -1;
if (vm.count("sendto"))
{
@@ -113,7 +112,7 @@ void end_examples(sender& s)
}
s->all = &all;
- s->delay_ring = (example**) calloc(all.p->ring_size, sizeof(example*));
+ s->delay_ring = (example**) calloc_or_die(all.p->ring_size, sizeof(example*));
learner* l = new learner(s, 1);
l->set_learn<sender, learn>();