Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This structure was not necessary
[simgrid.git] / src / xbt / graphxml_parse.c
index 34ada6c..e5700e4 100644 (file)
@@ -122,11 +122,13 @@ static int _xbt_graph_parse(void)
 
 int_f_void_t xbt_graph_parse = _xbt_graph_parse;
 
-void xbt_graph_parse_get_double(double *value, const char *string)
+double xbt_graph_parse_get_double(const char *string)
 {
-  int ret = 0;
+  double result;
+  _XBT_GNUC_UNUSED int ret = 0;
 
-  ret = sscanf(string, "%lg", value);
+  ret = sscanf(string, "%lg", &result);
   xbt_assert((ret == 1), "Parse error line %d : %s not a number",
               xbt_graph_parse_lineno, string);
+  return result;
 }