diff options
-rw-r--r-- | grp/initgroups.c | 2 | ||||
-rw-r--r-- | nscd/initgrcache.c | 4 | ||||
-rw-r--r-- | sysdeps/i386/bits/atomic.h | 5 |
3 files changed, 8 insertions, 3 deletions
diff --git a/grp/initgroups.c b/grp/initgroups.c index f86f5c63f4..5a3edecf09 100644 --- a/grp/initgroups.c +++ b/grp/initgroups.c @@ -108,7 +108,7 @@ internal_getgrouplist (const char *user, gid_t group, long int *size, { long int inner; for (inner = 0; inner < prev_start; ++inner) - if ((*groupsp)[inner] == (*groups)[cnt]) + if ((*groupsp)[inner] == (*groupsp)[cnt]) break; if (inner < prev_start) diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index 9ba7b89bdf..762167ea19 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -140,13 +140,13 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, { long int inner; for (inner = 0; inner < prev_start; ++inner) - if ((*groupsp)[inner] == (*groups)[cnt]) + if (groups[inner] == groups[cnt]) break; if (inner < prev_start) ++cnt; else - (*groupsp)[cnt] = (*groupsp)[--start]; + groups[cnt] = groups[--start]; } if (status != NSS_STATUS_TRYAGAIN) diff --git a/sysdeps/i386/bits/atomic.h b/sysdeps/i386/bits/atomic.h index 27840f9fe3..aa3f901877 100644 --- a/sysdeps/i386/bits/atomic.h +++ b/sysdeps/i386/bits/atomic.h @@ -181,6 +181,11 @@ init_has_cmpxchg (void) \ \ *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; }) +/* XXX We do not really need 64-bit compare-and-exchange. At least + not in the moment. */ +# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ + ({ __typeof (*mem) ret = *(mem); abort (); ret = (newval); ret = (oldval); }) + #endif /* Note that we need no lock prefix. */ |