Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simplification (plus remove a warning blocking the compilation)
[simgrid.git] / src / msg / msg_mailbox.c
index 1862138..a6556a2 100644 (file)
@@ -169,28 +169,10 @@ MSG_mailbox_free(void* mailbox)
 msg_mailbox_t\r
 MSG_mailbox_get_by_alias(const char* alias)\r
 {\r
-       xbt_ex_t e;\r
-       int found = 1;\r
-       msg_mailbox_t mailbox;\r
 \r
-       TRY \r
-       {\r
-               mailbox = xbt_dict_get(msg_mailboxes,alias);\r
-       } \r
-       CATCH(e) \r
-       {\r
-               if (e.category == not_found_error) \r
-               {\r
-                       found = 0;\r
-                       xbt_ex_free(e);\r
-               } \r
-               else \r
-               {\r
-                       RETHROW;\r
-               }\r
-       }\r
-\r
-       if(!found)\r
+       msg_mailbox_t mailbox = xbt_dict_get_or_null(msg_mailboxes,alias);\r
+   \r
+       if(!mailbox)\r
        {\r
                mailbox = MSG_mailbox_new(alias);\r
                MSG_mailbox_set_hostname(mailbox,MSG_host_self()->name);\r