Переглянути джерело

Remove a double unlock in logsys.

In logsys there are a number of XYZ_unlocked() functions that are called
like this:

       pthread_mutex_lock (&logsys_config_mutex);

       XYZ_unlocked();

       pthread_mutex_unlock (&logsys_config_mutex);

The XYZ_unlocked() functions should not do any (un)locking.
But _logsys_config_subsys_get_unlocked() unlocks if it finds the subsys.
This means that there is 1 lock and 2 unlocks.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2404 fd59a12c-fef9-0310-b244-a6a79926bd2f
Angus Salkeld 16 роки тому
батько
коміт
e1ceabc6ef
1 змінених файлів з 0 додано та 1 видалено
  1. 0 1
      exec/logsys.c

+ 0 - 1
exec/logsys.c

@@ -824,7 +824,6 @@ static int _logsys_config_subsys_get_unlocked (const char *subsys)
 
  	for (i = 0; i <= LOGSYS_MAX_SUBSYS_COUNT; i++) {
 		if (strcmp (logsys_loggers[i].subsys, subsys) == 0) {
-			pthread_mutex_unlock (&logsys_config_mutex);
 			return i;
 		}
 	}