Permalink
Browse files

Fix some comp warnings/error return values in glpk

  • Loading branch information...
1 parent e9a6298 commit a75b5893f5f95fffeff73962658affb3f36fe91e @gaborcsardi gaborcsardi committed Jun 22, 2015
Showing with 6 additions and 2 deletions.
  1. +6 −2 optional/glpk/glpenv01.c
@@ -132,15 +132,19 @@ ENV *get_env_ptr(void)
{ /* not initialized yet; perform initialization */
if (glp_init_env() != 0)
{ /* initialization failed; display an error message */
- IGRAPH_ERROR("GLPK initialization failed", IGRAPH_EGLP);
+ igraph_error("GLPK initialization failed", __FILE__, __LINE__,
+ IGRAPH_EGLP);
+ return NULL;
}
/* initialization successful; retrieve the pointer */
env = tls_get_ptr();
}
/* check if the environment block is valid */
if (env->magic != ENV_MAGIC)
{
- IGRAPH_ERROR("Invalid GLPK environment", IGRAPH_EGLP);
+ igraph_error("Invalid GLPK environment", __FILE__, __LINE__,
+ IGRAPH_EGLP);
+ return NULL;
}
return env;
}

0 comments on commit a75b589

Please sign in to comment.