Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use 0 to indicate an invalid PID instead of -1. Someone may consider it unsigned...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 3 Jul 2007 20:05:34 +0000 (20:05 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 3 Jul 2007 20:05:34 +0000 (20:05 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3650 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/m_process.c

index c3b04d1..7e71699 100644 (file)
@@ -230,14 +230,14 @@ m_process_t MSG_process_from_PID(int PID)
  * \brief Returns the process ID of \a process.
  *
  * This functions checks whether \a process is a valid pointer or not 
  * \brief Returns the process ID of \a process.
  *
  * This functions checks whether \a process is a valid pointer or not 
-   and return its PID.
+   and return its PID (or 0 in case of problem).
  */
 int MSG_process_get_PID(m_process_t process)
 {
   /* Do not raise an exception here: this function is used in the logs, 
      and it will be called back by the exception handling stuff */
   if (process == NULL || process->simdata == NULL)
  */
 int MSG_process_get_PID(m_process_t process)
 {
   /* Do not raise an exception here: this function is used in the logs, 
      and it will be called back by the exception handling stuff */
   if (process == NULL || process->simdata == NULL)
-     return -1;
+     return 0;
 
   return (((simdata_process_t) process->simdata)->PID);
 }
 
   return (((simdata_process_t) process->simdata)->PID);
 }