mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
nss-systemd: make llvm work-around for used _cleanup_ explicit
This commit is contained in:
parent
bbfb8c878c
commit
2d882d3581
@ -294,8 +294,8 @@ static enum nss_status nss_systemd_endent(GetentData *p) {
|
||||
|
||||
assert(p);
|
||||
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = NULL;
|
||||
_l = pthread_mutex_lock_assert(&p->mutex);
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = pthread_mutex_lock_assert(&p->mutex);
|
||||
(void) _l; /* make llvm shut up about _l not being used. */
|
||||
|
||||
p->iterator = userdb_iterator_free(p->iterator);
|
||||
p->by_membership = false;
|
||||
@ -312,16 +312,16 @@ enum nss_status _nss_systemd_endgrent(void) {
|
||||
}
|
||||
|
||||
enum nss_status _nss_systemd_setpwent(int stayopen) {
|
||||
int r;
|
||||
|
||||
PROTECT_ERRNO;
|
||||
NSS_ENTRYPOINT_BEGIN;
|
||||
|
||||
if (_nss_systemd_is_blocked())
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = NULL;
|
||||
int r;
|
||||
|
||||
_l = pthread_mutex_lock_assert(&getpwent_data.mutex);
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = pthread_mutex_lock_assert(&getpwent_data.mutex);
|
||||
(void) _l; /* make llvm shut up about _l not being used. */
|
||||
|
||||
getpwent_data.iterator = userdb_iterator_free(getpwent_data.iterator);
|
||||
getpwent_data.by_membership = false;
|
||||
@ -336,16 +336,16 @@ enum nss_status _nss_systemd_setpwent(int stayopen) {
|
||||
}
|
||||
|
||||
enum nss_status _nss_systemd_setgrent(int stayopen) {
|
||||
int r;
|
||||
|
||||
PROTECT_ERRNO;
|
||||
NSS_ENTRYPOINT_BEGIN;
|
||||
|
||||
if (_nss_systemd_is_blocked())
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = NULL;
|
||||
int r;
|
||||
|
||||
_l = pthread_mutex_lock_assert(&getgrent_data.mutex);
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = pthread_mutex_lock_assert(&getgrent_data.mutex);
|
||||
(void) _l; /* make llvm shut up about _l not being used. */
|
||||
|
||||
getgrent_data.iterator = userdb_iterator_free(getgrent_data.iterator);
|
||||
getgrent_data.by_membership = false;
|
||||
@ -372,9 +372,8 @@ enum nss_status _nss_systemd_getpwent_r(
|
||||
if (_nss_systemd_is_blocked())
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = NULL;
|
||||
|
||||
_l = pthread_mutex_lock_assert(&getpwent_data.mutex);
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = pthread_mutex_lock_assert(&getpwent_data.mutex);
|
||||
(void) _l; /* make llvm shut up about _l not being used. */
|
||||
|
||||
if (!getpwent_data.iterator) {
|
||||
UNPROTECT_ERRNO;
|
||||
@ -419,9 +418,8 @@ enum nss_status _nss_systemd_getgrent_r(
|
||||
if (_nss_systemd_is_blocked())
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = NULL;
|
||||
|
||||
_l = pthread_mutex_lock_assert(&getgrent_data.mutex);
|
||||
_cleanup_(pthread_mutex_unlock_assertp) pthread_mutex_t *_l = pthread_mutex_lock_assert(&getgrent_data.mutex);
|
||||
(void) _l; /* make llvm shut up about _l not being used. */
|
||||
|
||||
if (!getgrent_data.iterator) {
|
||||
UNPROTECT_ERRNO;
|
||||
|
Loading…
x
Reference in New Issue
Block a user