Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
greatly reduce the amount of atoi in our codebase
[simgrid.git] / examples / msg / pmm / msg_pmm.c
index 530b15d7343376edb5332420c87cb107f83d08bb..f1e02aac430f3b5dba67fd00238fd1626c5c1028 100644 (file)
@@ -77,7 +77,7 @@ int node(int argc, char **argv)
   xbt_assert(argc != 1, "Wrong number of arguments for this node");
 
   /* Initialize the node's data-structures */
-  myid = atoi(argv[1]);
+  myid = xbt_str_parse_int(argv[1], "Invalid ID received as first node parameter: %s");
   snprintf(my_mbox, MAILBOX_NAME_SIZE - 1, "%d", myid);
   sC = xbt_matrix_double_new_zeros(NODE_MATRIX_SIZE, NODE_MATRIX_SIZE);