From: mquinson Date: Mon, 6 Jun 2005 20:50:14 +0000 (+0000) Subject: Survive NULL datadesc in datadesc_get_name; change the prototype of this function... X-Git-Tag: v3.3~4004 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1e36e64ebb00f7e5e62793c7b4f9f0a8da617261?hp=a810e06af15688fb21253ff4b2ccf5ffc23cf8d0 Survive NULL datadesc in datadesc_get_name; change the prototype of this function to return a const char* git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1351 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/DataDesc/datadesc.c b/src/gras/DataDesc/datadesc.c index dcb8b9ec21..fca00c4c02 100644 --- a/src/gras/DataDesc/datadesc.c +++ b/src/gras/DataDesc/datadesc.c @@ -127,9 +127,9 @@ gras_datadesc_exit(void) { } /** This is mainly to debug */ -char * +const char * gras_datadesc_get_name(gras_datadesc_type_t ddt) { - return ddt->name; + return ddt?(const char*)ddt->name:"(null)"; } /** This is mainly to debug */ int