File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,11 @@ struct passwd_s
9696#if defined(CONFIG_FS_WRITABLE ) && !defined(CONFIG_FSUTILS_PASSWD_READONLY )
9797# define PASSWD_SEM_DECL (s ) FAR sem_t *s
9898int passwd_lock (FAR sem_t * * semp );
99- int passwd_unlock (FAR sem_t * sem );
99+ void passwd_unlock (FAR sem_t * sem );
100100#else
101101# define PASSWD_SEM_DECL (s )
102102# define passwd_lock (semp ) (0)
103- # define passwd_unlock (sem ) (0)
103+ # define passwd_unlock (sem )
104104#endif
105105
106106/****************************************************************************
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ static sem_t g_passwd_sem = SEM_INITIALIZER(1);
7171 * Public Functions
7272 ****************************************************************************/
7373/****************************************************************************
74- * Name: passwd_lock and passwd_unlock
74+ * Name: passwd_lock
7575 *
7676 * Description:
7777 * Lock the /etc/passwd file. This is not a real lock at the level of the
@@ -121,7 +121,21 @@ int passwd_lock(FAR sem_t **semp)
121121 return OK ;
122122}
123123
124- int passwd_unlock (FAR sem_t * sem )
124+ /****************************************************************************
125+ * Name: passwd_unlock
126+ *
127+ * Description:
128+ * Undo the work done by passwd_lock.
129+ *
130+ * Input Parameters:
131+ * sem Pointer to the semaphore
132+ *
133+ * Returned Value:
134+ * None
135+ *
136+ ****************************************************************************/
137+
138+ void passwd_unlock (FAR sem_t * sem )
125139{
126140 /* Release our count on the semaphore */
127141
@@ -132,6 +146,4 @@ int passwd_unlock(FAR sem_t *sem)
132146
133147 sem_close (sem );
134148#endif
135-
136- return OK ;
137149}
You can’t perform that action at this time.
0 commit comments