diff --git a/fsutils/passwd/passwd.h b/fsutils/passwd/passwd.h index 74ddcb148..e509d368b 100644 --- a/fsutils/passwd/passwd.h +++ b/fsutils/passwd/passwd.h @@ -96,11 +96,11 @@ struct passwd_s #if defined(CONFIG_FS_WRITABLE) && !defined(CONFIG_FSUTILS_PASSWD_READONLY) # define PASSWD_SEM_DECL(s) FAR sem_t *s int passwd_lock(FAR sem_t **semp); -int passwd_unlock(FAR sem_t *sem); +void passwd_unlock(FAR sem_t *sem); #else # define PASSWD_SEM_DECL(s) # define passwd_lock(semp) (0) -# define passwd_unlock(sem) (0) +# define passwd_unlock(sem) #endif /**************************************************************************** diff --git a/fsutils/passwd/passwd_lock.c b/fsutils/passwd/passwd_lock.c index 8472f5ff2..a2dc85ec2 100644 --- a/fsutils/passwd/passwd_lock.c +++ b/fsutils/passwd/passwd_lock.c @@ -71,7 +71,7 @@ static sem_t g_passwd_sem = SEM_INITIALIZER(1); * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: passwd_lock and passwd_unlock + * Name: passwd_lock * * Description: * 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) return OK; } -int passwd_unlock(FAR sem_t *sem) +/**************************************************************************** + * Name: passwd_unlock + * + * Description: + * Undo the work done by passwd_lock. + * + * Input Parameters: + * sem Pointer to the semaphore + * + * Returned Value: + * None + * + ****************************************************************************/ + +void passwd_unlock(FAR sem_t *sem) { /* Release our count on the semaphore */ @@ -132,6 +146,4 @@ int passwd_unlock(FAR sem_t *sem) sem_close(sem); #endif - - return OK; }