- if (msg_global->max_channel > 0)
- priv->mailboxes = xbt_new0(msg_mailbox_t, msg_global->max_channel);
+ priv->mailboxes = (msg_global->max_channel > 0) ?
+ xbt_new0(msg_mailbox_t, msg_global->max_channel) : NULL;
for (i = 0; i < msg_global->max_channel; i++) {
sprintf(alias, "%s:%d", name, i);
for (i = 0; i < msg_global->max_channel; i++) {
sprintf(alias, "%s:%d", name, i);
or not and attach \a data to \a host if it is possible.
*/
msg_error_t MSG_host_set_data(msg_host_t host, void *data)
{
or not and attach \a data to \a host if it is possible.
*/
msg_error_t MSG_host_set_data(msg_host_t host, void *data)
{
xbt_assert((host != NULL), "Invalid parameters (host is NULL)");
return (simcall_host_get_state(host));
}
xbt_assert((host != NULL), "Invalid parameters (host is NULL)");
return (simcall_host_get_state(host));
}
/** \ingroup m_host_management
* \brief Set the parameters of a given host
*
* \param host a host
* \param params a prameter object
*/
/** \ingroup m_host_management
* \brief Set the parameters of a given host
*
* \param host a host
* \param params a prameter object
*/
xbt_dict_t storage_list = simcall_host_get_storage_list(host);
xbt_dict_foreach(storage_list,cursor,mount_name,storage_name){
xbt_dict_t storage_list = simcall_host_get_storage_list(host);
xbt_dict_foreach(storage_list,cursor,mount_name,storage_name){
- storage = (msg_storage_t)xbt_lib_get_elm_or_null(storage_lib,storage_name);
- xbt_dict_t content = simcall_storage_get_content(storage);
- xbt_dict_set(contents,mount_name, content,NULL);
+ storage = (msg_storage_t)xbt_lib_get_elm_or_null(storage_lib,storage_name);
+ xbt_dict_t content = simcall_storage_get_content(storage);
+ xbt_dict_set(contents,mount_name, content,NULL);