Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove memory allocation check
SG_MALLOC checks itself if the memory allocation was successful
or not
  • Loading branch information
vigsterkr committed Feb 17, 2012
1 parent 53cab65 commit eb1eff2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/shogun/preprocessor/HomogeneousKernelMap.cpp
Expand Up @@ -106,12 +106,7 @@ void CHomogeneousKernelMap::init () {
m_table = SGVector<float64_t> (NULL, numElements, true);
m_table.vlen = numElements;
m_table.vector = SG_CALLOC (float64_t, numElements);

/* check whether allocation was ok */
if (m_table.vector == NULL) {
throw ShogunException ("CHomogeneousKernelMap::init: could not allocate memory for vector");
}


int exponent;
uint64_t i = 0, j = 0;
float64_t* tablep = m_table.vector;
Expand Down

0 comments on commit eb1eff2

Please sign in to comment.