From f37d96a8c005ca3a0bce2137d6e464288aa5552f Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Fri, 12 Mar 1999 19:53:28 +0000 Subject: 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) --- source3/lib/util.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source3/lib') 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; } @@ -2909,12 +2909,24 @@ 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++; } -- cgit