Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
one more buf fix to simdag prop
[simgrid.git] / examples / simdag / properties / sd_prop.c
index 5816cbf..843269c 100755 (executable)
@@ -54,7 +54,7 @@ int main(int argc, char **argv) {
   }
  
   /* Try to get a property that does not exist */
   }
  
   /* Try to get a property that does not exist */
-  char *noexist="NoProp";
+  char noexist[]="NoProp";
   const char *value = SD_workstation_get_property_value(w1,noexist);
   if ( value == NULL) 
     INFO1("\tProperty: %s is undefined", noexist);
   const char *value = SD_workstation_get_property_value(w1,noexist);
   if ( value == NULL) 
     INFO1("\tProperty: %s is undefined", noexist);
@@ -73,8 +73,8 @@ int main(int argc, char **argv) {
   }
 
   /* Modify an existing property test. First check it exists */\
   }
 
   /* Modify an existing property test. First check it exists */\
-  INFO0("Modify an host existing property");
-  char *exist="Hdd";
+  INFO0("Modify an existing property");
+  char exist[]="Hdd";
   value = SD_workstation_get_property_value(w2,exist);
   if ( value == NULL) 
     INFO1("\tProperty: %s is undefined", exist);
   value = SD_workstation_get_property_value(w2,exist);
   if ( value == NULL) 
     INFO1("\tProperty: %s is undefined", exist);
@@ -111,8 +111,8 @@ int main(int argc, char **argv) {
     INFO3("\tLink %s property: %s has value: %s",SD_link_get_name(route[i]),key,data);
 
     /* Try to get a property that does not exist */
     INFO3("\tLink %s property: %s has value: %s",SD_link_get_name(route[i]),key,data);
 
     /* Try to get a property that does not exist */
-    noexist=xbt_strdup("Other");
-    value = SD_link_get_property_value(route[i], noexist);
+    char noexist1[]="Other";
+    value = SD_link_get_property_value(route[i], noexist1);
     if ( value == NULL) 
       INFO2("\tProperty: %s for link %s is undefined", noexist, SD_link_get_name(route[i]));
     else
     if ( value == NULL) 
       INFO2("\tProperty: %s for link %s is undefined", noexist, SD_link_get_name(route[i]));
     else