diff options
author | Luke Leighton <lkcl@samba.org> | 1999-03-12 19:53:28 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-03-12 19:53:28 +0000 |
commit | f37d96a8c005ca3a0bce2137d6e464288aa5552f (patch) | |
tree | 420bac054eeeca62b3b2f8f8a2652630f61ed455 /source3 | |
parent | c4241b56628469227f84f9d0b7589d9bc07d7bd3 (diff) | |
download | samba-f37d96a8c005ca3a0bce2137d6e464288aa5552f.tar.gz samba-f37d96a8c005ca3a0bce2137d6e464288aa5552f.tar.bz2 samba-f37d96a8c005ca3a0bce2137d6e464288aa5552f.zip |
Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.
(This used to be commit 81b5304fe5ea518680b2516e2da39f31c1d05afb)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 2bab2f0386..30ad0a7065 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2395,7 +2395,7 @@ BOOL get_unix_grps(int *p_ngroups, struct group **p_groups) DEBUG(10,("get_unix_grps\n")); - if (p_ngroups == NULL || *p_groups == NULL) + if (p_ngroups == NULL || p_groups == NULL) { return False; } @@ -2910,11 +2910,23 @@ enum remote_arch_types get_remote_arch(void) /******************************************************************* + align a pointer to a multiple of 4 bytes. + ********************************************************************/ +char *align4(char *q, char *base) +{ + int mod = PTR_DIFF(q, base) & 3; + if (mod != 0) + { + q += mod; + } + return q; +} +/******************************************************************* align a pointer to a multiple of 2 bytes ********************************************************************/ char *align2(char *q, char *base) { - if ((q - base) & 1) + if (PTR_DIFF(q, base) & 1) { q++; } |