[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Wed Aug 10 13:13:01 MDT 2011
The branch, master has been updated
via f7b820c Adapt tally_histogram to Samba coding conventions
via fed9775 Adapt get_max_bucket to Samba coding conventions
via 35550ba Adapt tally_approx_median to Samba coding conventions
via eac2f44 Adapt bucket_range to Samba coding conventions
via 06a4159 Adapt tally_mean to Samba coding conventions
via f589af1 Adapt divls64 to Samba coding conventions
via b32f086 Avoid some // style comments in divls64
via ee91004 Adapt divlu64 to Samba coding conventions
via 26795b3 Avoid some // style comments in divlu64
via 73414d0 Adapt fls64 to Samba coding conventions
via 3f67063 Adapt tally_num to Samba coding conventions
via 9c32c86 Adapt tally_add to Samba coding conventions
via 1fa4236 Adapt renormalize to Samba coding conventions
via 4a3913f Adapt shift_overflows to Samba coding conventions
via a2d1d0b Adapt bucket_min to Samba coding conventions
via 68d0843 Adapt bucket_of to Samba coding conventions
via c6ae297 Adapt tally_new to Samba coding conventions
via 066d36a Slightly simplify tally_new
via cb5c6f4 Fix a c++ warning
via 54282e9 Fix a c++ warning
via 38fb4df s3: Adapt msg_idmap.c to Samba coding conventions
via 223fbc9 s3: Fix some nonempty blank lines
via 63435f9 s3: Fix some typos -- Simo, please check
from d53e3ec selftest: Always test the spoolss deamon.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f7b820c3590ac78dd0dea67ac882f53ae6f550d9
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:53:53 2011 +0200
Adapt tally_histogram to Samba coding conventions
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Wed Aug 10 21:12:59 CEST 2011 on sn-devel-104
commit fed977514019e130322fb21ad5726ee997965898
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:52:58 2011 +0200
Adapt get_max_bucket to Samba coding conventions
commit 35550ba641d251a2dc3762b08eda92d0f7ce6bed
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:52:40 2011 +0200
Adapt tally_approx_median to Samba coding conventions
commit eac2f44cde39d16b827b7e2d360f7a7fb1d940e5
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:52:15 2011 +0200
Adapt bucket_range to Samba coding conventions
commit 06a41594554a1a6881dcbf9d051a822f8f955b56
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:51:56 2011 +0200
Adapt tally_mean to Samba coding conventions
commit f589af19821e12aba6145492fd4ded58f07131b8
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:51:26 2011 +0200
Adapt divls64 to Samba coding conventions
commit b32f086d643eb39c3806e30b19a028e6a59f0054
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:50:52 2011 +0200
Avoid some // style comments in divls64
commit ee91004f4bddcda873f8ccde1db16609a66a493b
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:49:55 2011 +0200
Adapt divlu64 to Samba coding conventions
commit 26795b3dd1a90c61424cd8f1761f98bc60b3ddc4
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:49:23 2011 +0200
Avoid some // style comments in divlu64
commit 73414d0ee7bbe371b0f9b275b44ce5854a10b9f2
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:46:52 2011 +0200
Adapt fls64 to Samba coding conventions
commit 3f67063dfab1a7add95da5157206ccebb2f75df8
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:46:37 2011 +0200
Adapt tally_num to Samba coding conventions
commit 9c32c86783bf6a3e126e6e83f51ccdf0ecdd132d
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:46:24 2011 +0200
Adapt tally_add to Samba coding conventions
commit 1fa4236c40a727d7ae648e12d14d1f0f9fcf79b5
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:46:00 2011 +0200
Adapt renormalize to Samba coding conventions
commit 4a3913fbb9399685785efa430765e0b5836ded60
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:45:40 2011 +0200
Adapt shift_overflows to Samba coding conventions
commit a2d1d0b51485f2d383d1d69fa3bd6b79b9e8d5aa
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:45:24 2011 +0200
Adapt bucket_min to Samba coding conventions
commit 68d0843437b05dc8a36091e4a307bfd912cbc09f
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:45:14 2011 +0200
Adapt bucket_of to Samba coding conventions
commit c6ae297d613fc22b92c34d26c61ec1715058b484
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:44:45 2011 +0200
Adapt tally_new to Samba coding conventions
commit 066d36a1a635e1115f62c452c49a9830d484c03b
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:44:10 2011 +0200
Slightly simplify tally_new
commit cb5c6f441f394f91bedf641aa76841bdb833e440
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:43:21 2011 +0200
Fix a c++ warning
commit 54282e9f4eda083e70c7e56dda2bf425209add6d
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:42:54 2011 +0200
Fix a c++ warning
commit 38fb4df6944ee660044788d5a8cb6764d8a2caef
Author: Volker Lendecke <vl at samba.org>
Date: Fri Aug 5 18:22:20 2011 +0200
s3: Adapt msg_idmap.c to Samba coding conventions
commit 223fbc9c62b832a2959ce75d1fcd0824330b6f18
Author: Volker Lendecke <vl at samba.org>
Date: Fri Aug 5 18:17:43 2011 +0200
s3: Fix some nonempty blank lines
commit 63435f9ef2123596f714c1ec816c9a27d8f0e1e8
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 10 19:40:18 2011 +0200
s3: Fix some typos -- Simo, please check
-----------------------------------------------------------------------
Summary of changes:
lib/ccan/tally/tally.c | 176 ++++++++++++++++++++++++-----------------
source3/lib/server_prefork.h | 14 ++--
source3/smbd/globals.c | 2 +-
source3/smbd/msg_idmap.c | 10 +-
4 files changed, 116 insertions(+), 86 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c
index 0d49319..774373c 100644
--- a/lib/ccan/tally/tally.c
+++ b/lib/ccan/tally/tally.c
@@ -25,29 +25,36 @@ struct tally *tally_new(unsigned buckets)
struct tally *tally;
/* There is always 1 bucket. */
- if (buckets == 0)
+ if (buckets == 0) {
buckets = 1;
+ }
/* Overly cautious check for overflow. */
- if (sizeof(*tally) * buckets / sizeof(*tally) != buckets)
+ if (sizeof(*tally) * buckets / sizeof(*tally) != buckets) {
+ return NULL;
+ }
+
+ tally = (struct tally *)malloc(
+ sizeof(*tally) + sizeof(tally->counts[0])*(buckets-1));
+ if (tally == NULL) {
return NULL;
- tally = malloc(sizeof(*tally) + sizeof(tally->counts[0])*(buckets-1));
- if (tally) {
- tally->max = ((size_t)1 << (SIZET_BITS - 1));
- tally->min = ~tally->max;
- tally->total[0] = tally->total[1] = 0;
- tally->buckets = buckets;
- tally->step_bits = 0;
- memset(tally->counts, 0, sizeof(tally->counts[0])*buckets);
}
+
+ tally->max = ((size_t)1 << (SIZET_BITS - 1));
+ tally->min = ~tally->max;
+ tally->total[0] = tally->total[1] = 0;
+ tally->buckets = buckets;
+ tally->step_bits = 0;
+ memset(tally->counts, 0, sizeof(tally->counts[0])*buckets);
return tally;
}
static unsigned bucket_of(ssize_t min, unsigned step_bits, ssize_t val)
{
/* Don't over-shift. */
- if (step_bits == SIZET_BITS)
+ if (step_bits == SIZET_BITS) {
return 0;
+ }
assert(step_bits < SIZET_BITS);
return (size_t)(val - min) >> step_bits;
}
@@ -56,8 +63,9 @@ static unsigned bucket_of(ssize_t min, unsigned step_bits, ssize_t val)
static ssize_t bucket_min(ssize_t min, unsigned step_bits, unsigned b)
{
/* Don't over-shift. */
- if (step_bits == SIZET_BITS)
+ if (step_bits == SIZET_BITS) {
return min;
+ }
assert(step_bits < SIZET_BITS);
return min + ((ssize_t)b << step_bits);
}
@@ -65,8 +73,9 @@ static ssize_t bucket_min(ssize_t min, unsigned step_bits, unsigned b)
/* Does shifting by this many bits truncate the number? */
static bool shift_overflows(size_t num, unsigned bits)
{
- if (bits == 0)
+ if (bits == 0) {
return false;
+ }
return ((num << bits) >> 1) != (num << (bits - 1));
}
@@ -79,8 +88,9 @@ static void renormalize(struct tally *tally,
unsigned int i, old_min;
/* Uninitialized? Don't do anything... */
- if (tally->max < tally->min)
+ if (tally->max < tally->min) {
goto update;
+ }
/* If we don't have sufficient range, increase step bits until
* buckets cover entire range of ssize_t anyway. */
@@ -128,15 +138,17 @@ void tally_add(struct tally *tally, ssize_t val)
new_max = val;
need_renormalize = true;
}
- if (need_renormalize)
+ if (need_renormalize) {
renormalize(tally, new_min, new_max);
+ }
/* 128-bit arithmetic! If we didn't want exact mean, we could just
* pull it out of counts. */
- if (val > 0 && tally->total[0] + val < tally->total[0])
+ if (val > 0 && tally->total[0] + val < tally->total[0]) {
tally->total[1]++;
- else if (val < 0 && tally->total[0] + val > tally->total[0])
+ } else if (val < 0 && tally->total[0] + val > tally->total[0]) {
tally->total[1]--;
+ }
tally->total[0] += val;
tally->counts[bucket_of(tally->min, tally->step_bits, val)]++;
}
@@ -144,8 +156,9 @@ void tally_add(struct tally *tally, ssize_t val)
size_t tally_num(const struct tally *tally)
{
size_t i, num = 0;
- for (i = 0; i < tally->buckets; i++)
+ for (i = 0; i < tally->buckets; i++) {
num += tally->counts[i];
+ }
return num;
}
@@ -170,8 +183,9 @@ static unsigned fls64(uint64_t val)
#endif
uint64_t r = 64;
- if (!val)
+ if (!val) {
return 0;
+ }
if (!(val & 0xffffffff00000000ull)) {
val <<= 32;
r -= 32;
@@ -205,46 +219,49 @@ static unsigned fls64(uint64_t val)
/* This is stolen straight from Hacker's Delight. */
static uint64_t divlu64(uint64_t u1, uint64_t u0, uint64_t v)
{
- const uint64_t b = 4294967296ULL; // Number base (32 bits).
- uint32_t un[4], // Dividend and divisor
- vn[2]; // normalized and broken
- // up into halfwords.
- uint32_t q[2]; // Quotient as halfwords.
- uint64_t un1, un0, // Dividend and divisor
- vn0; // as fullwords.
- uint64_t qhat; // Estimated quotient digit.
- uint64_t rhat; // A remainder.
- uint64_t p; // Product of two digits.
+ const uint64_t b = 4294967296ULL; /* Number base (32 bits). */
+ uint32_t un[4], /* Dividend and divisor */
+ vn[2]; /* normalized and broken */
+ /* up into halfwords. */
+ uint32_t q[2]; /* Quotient as halfwords. */
+ uint64_t un1, un0, /* Dividend and divisor */
+ vn0; /* as fullwords. */
+ uint64_t qhat; /* Estimated quotient digit. */
+ uint64_t rhat; /* A remainder. */
+ uint64_t p; /* Product of two digits. */
int64_t s, i, j, t, k;
- if (u1 >= v) // If overflow, return the largest
- return (uint64_t)-1; // possible quotient.
+ if (u1 >= v) { /* If overflow, return the largest */
+ return (uint64_t)-1; /* possible quotient. */
+ }
- s = 64 - fls64(v); // 0 <= s <= 63.
- vn0 = v << s; // Normalize divisor.
- vn[1] = vn0 >> 32; // Break divisor up into
- vn[0] = vn0 & 0xFFFFFFFF; // two 32-bit halves.
+ s = 64 - fls64(v); /* 0 <= s <= 63. */
+ vn0 = v << s; /* Normalize divisor. */
+ vn[1] = vn0 >> 32; /* Break divisor up into */
+ vn[0] = vn0 & 0xFFFFFFFF; /* two 32-bit halves. */
// Shift dividend left.
un1 = ((u1 << s) | (u0 >> (64 - s))) & (-s >> 63);
un0 = u0 << s;
- un[3] = un1 >> 32; // Break dividend up into
- un[2] = un1; // four 32-bit halfwords
- un[1] = un0 >> 32; // Note: storing into
- un[0] = un0; // halfwords truncates.
+ un[3] = un1 >> 32; /* Break dividend up into */
+ un[2] = un1; /* four 32-bit halfwords */
+ un[1] = un0 >> 32; /* Note: storing into */
+ un[0] = un0; /* halfwords truncates. */
for (j = 1; j >= 0; j--) {
- // Compute estimate qhat of q[j].
+ /* Compute estimate qhat of q[j]. */
qhat = (un[j+2]*b + un[j+1])/vn[1];
rhat = (un[j+2]*b + un[j+1]) - qhat*vn[1];
again:
if (qhat >= b || qhat*vn[0] > b*rhat + un[j]) {
qhat = qhat - 1;
rhat = rhat + vn[1];
- if (rhat < b) goto again;
+ if (rhat < b) {
+ goto again;
+ }
}
- // Multiply and subtract.
+ /* Multiply and subtract. */
k = 0;
for (i = 0; i < 2; i++) {
p = qhat*vn[i];
@@ -255,9 +272,9 @@ static uint64_t divlu64(uint64_t u1, uint64_t u0, uint64_t v)
t = un[j+2] - k;
un[j+2] = t;
- q[j] = qhat; // Store quotient digit.
- if (t < 0) { // If we subtracted too
- q[j] = q[j] - 1; // much, add back.
+ q[j] = qhat; /* Store quotient digit. */
+ if (t < 0) { /* If we subtracted too */
+ q[j] = q[j] - 1; /* much, add back. */
k = 0;
for (i = 0; i < 2; i++) {
t = un[i+j] + vn[i] + k;
@@ -266,7 +283,7 @@ static uint64_t divlu64(uint64_t u1, uint64_t u0, uint64_t v)
}
un[j+2] = un[j+2] + k;
}
- } // End j.
+ } /* End j. */
return q[1]*b + q[0];
}
@@ -275,26 +292,28 @@ static int64_t divls64(int64_t u1, uint64_t u0, int64_t v)
{
int64_t q, uneg, vneg, diff, borrow;
- uneg = u1 >> 63; // -1 if u < 0.
- if (uneg) { // Compute the absolute
- u0 = -u0; // value of the dividend u.
+ uneg = u1 >> 63; /* -1 if u < 0. */
+ if (uneg) { /* Compute the absolute */
+ u0 = -u0; /* value of the dividend u. */
borrow = (u0 != 0);
u1 = -u1 - borrow;
}
- vneg = v >> 63; // -1 if v < 0.
- v = (v ^ vneg) - vneg; // Absolute value of v.
+ vneg = v >> 63; /* -1 if v < 0. */
+ v = (v ^ vneg) - vneg; /* Absolute value of v. */
- if ((uint64_t)u1 >= (uint64_t)v)
+ if ((uint64_t)u1 >= (uint64_t)v) {
goto overflow;
+ }
q = divlu64(u1, u0, v);
- diff = uneg ^ vneg; // Negate q if signs of
- q = (q ^ diff) - diff; // u and v differed.
+ diff = uneg ^ vneg; /* Negate q if signs of */
+ q = (q ^ diff) - diff; /* u and v differed. */
- if ((diff ^ q) < 0 && q != 0) { // If overflow, return the largest
- overflow: // possible neg. quotient.
+ if ((diff ^ q) < 0 && q != 0) { /* If overflow, return the
+ largest */
+ overflow: /* possible neg. quotient. */
q = 0x8000000000000000ULL;
}
return q;
@@ -303,8 +322,9 @@ static int64_t divls64(int64_t u1, uint64_t u0, int64_t v)
ssize_t tally_mean(const struct tally *tally)
{
size_t count = tally_num(tally);
- if (!count)
+ if (!count) {
return 0;
+ }
if (sizeof(tally->total[0]) == sizeof(uint32_t)) {
/* Use standard 64-bit arithmetic. */
@@ -347,10 +367,11 @@ static ssize_t bucket_range(const struct tally *tally, unsigned b, size_t *err)
ssize_t min, max;
min = bucket_min(tally->min, tally->step_bits, b);
- if (b == tally->buckets - 1)
+ if (b == tally->buckets - 1) {
max = tally->max;
- else
+ } else {
max = bucket_min(tally->min, tally->step_bits, b+1) - 1;
+ }
/* FIXME: Think harder about cumulative error; is this enough?. */
*err = (max - min + 1) / 2;
@@ -365,8 +386,9 @@ ssize_t tally_approx_median(const struct tally *tally, size_t *err)
for (i = 0; i < tally->buckets; i++) {
total += tally->counts[i];
- if (total * 2 >= count)
+ if (total * 2 >= count) {
break;
+ }
}
return bucket_range(tally, i, err);
}
@@ -400,9 +422,11 @@ static unsigned get_max_bucket(const struct tally *tally)
{
unsigned int i;
- for (i = tally->buckets; i > 0; i--)
- if (tally->counts[i-1])
+ for (i = tally->buckets; i > 0; i--) {
+ if (tally->counts[i-1]) {
break;
+ }
+ }
return i;
}
@@ -427,15 +451,17 @@ char *tally_histogram(const struct tally *tally,
/* We create a temporary then renormalize so < height. */
/* FIXME: Antialias properly! */
tmp = tally_new(tally->buckets);
- if (!tmp)
+ if (!tmp) {
return NULL;
+ }
tmp->min = tally->min;
tmp->max = tally->max;
tmp->step_bits = tally->step_bits;
memcpy(tmp->counts, tally->counts,
sizeof(tally->counts[0]) * tmp->buckets);
- while ((max_bucket = get_max_bucket(tmp)) >= height)
+ while ((max_bucket = get_max_bucket(tmp)) >= height) {
renormalize(tmp, tmp->min, tmp->max * 2);
+ }
/* Restore max */
tmp->max = tally->max;
tally = tmp;
@@ -445,11 +471,12 @@ char *tally_histogram(const struct tally *tally,
/* Figure out longest line, for scale. */
largest_bucket = 0;
for (i = 0; i < tally->buckets; i++) {
- if (tally->counts[i] > largest_bucket)
+ if (tally->counts[i] > largest_bucket) {
largest_bucket = tally->counts[i];
+ }
}
- p = graph = malloc(height * (width + 1) + 1);
+ p = graph = (char *)malloc(height * (width + 1) + 1);
if (!graph) {
free(tmp);
return NULL;
@@ -462,23 +489,26 @@ char *tally_histogram(const struct tally *tally,
row = height - i - 1;
count = (double)tally->counts[row] / largest_bucket * (width-1)+1;
- if (row == 0)
+ if (row == 0) {
covered = snprintf(p, width, "%zi", tally->min);
- else if (row == height - 1)
+ } else if (row == height - 1) {
covered = snprintf(p, width, "%zi", tally->max);
- else if (row == bucket_of(tally->min, tally->step_bits, 0))
+ } else if (row == bucket_of(tally->min, tally->step_bits, 0)) {
*p = '+';
- else
+ } else {
*p = '|';
+ }
- if (covered > width)
+ if (covered > width) {
covered = width;
+ }
p += covered;
- if (count > covered)
+ if (count > covered) {
count -= covered;
- else
+ } else {
count = 0;
+ }
memset(p, '*', count);
p += count;
diff --git a/source3/lib/server_prefork.h b/source3/lib/server_prefork.h
index 31ebe21..4874359 100644
--- a/source3/lib/server_prefork.h
+++ b/source3/lib/server_prefork.h
@@ -38,7 +38,7 @@ enum pf_server_cmds {
};
/**
-* @brief This structure is shared betwee the controlling parent and the
+* @brief This structure is shared between the controlling parent and the
* the child. The parent can only write to the 'cmds' and
* 'allowed_clients' variables, while a child is running.
* The child can change 'status', and 'num_clients'.
@@ -121,7 +121,7 @@ bool prefork_create_pool(TALLOC_CTX *mem_ctx,
prefork_main_fn_t *main_fn, void *private_data,
struct prefork_pool **pf_pool);
/**
-* @brief Function used to attemp to expand the size of children.
+* @brief Function used to attempt to expand the size of children.
*
* @param pfp The pool structure.
* @param new_max The new max number of children.
@@ -130,7 +130,7 @@ bool prefork_create_pool(TALLOC_CTX *mem_ctx,
* ENOSPC if the mmap area could not be grown to the requested size
* EINVAL if the new max is invalid.
*
-* NOTE: this funciton can easily fail if the mmap area cannot be enlarged.
+* NOTE: this function can easily fail if the mmap area cannot be enlarged.
* A well behaving parent MUST NOT error out if this happen.
*/
int prefork_expand_pool(struct prefork_pool *pfp, int new_max);
@@ -153,7 +153,7 @@ int prefork_add_children(struct tevent_context *ev_ctx,
struct prefork_pool *pfp,
int num_children);
/**
-* @brief Commands a number fo children to stop and exit
+* @brief Commands a number of children to stop and exit
*
* @param pfp The pool.
* @param num_children The number of children we need to retire.
@@ -164,8 +164,8 @@ int prefork_add_children(struct tevent_context *ev_ctx,
*
* @return Number of children that were signaled to stop
*
-* NOTE: Only children that has no attached clients can be stopped.
-* If all the available children are too young or are busy than it
+* NOTE: Only children that have no attached clients can be stopped.
+* If all the available children are too young or are busy then it
* is possible that none will be asked to stop.
*/
int prefork_retire_children(struct prefork_pool *pfp,
@@ -227,7 +227,7 @@ void prefork_set_sigchld_callback(struct prefork_pool *pfp,
/**
* @brief Try to listen and accept on one of the listening sockets.
* Asynchronusly tries to grab the lock and perform an accept.
-* Will automatically updated the 'status' of the child and handle
+* Will automatically update the 'status' of the child and handle
* all the locking/unlocking/timingout as necessary.
* Changes behavior depending on whether the child already has other
* client connections. If not it blocks on the lock call for periods of
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c
index 5cba80f..196be17 100644
--- a/source3/smbd/globals.c
+++ b/source3/smbd/globals.c
@@ -153,7 +153,7 @@ static const struct smbd_shim smbd_shim_fns =
.send_stat_cache_delete_message = smbd_send_stat_cache_delete_message,
.can_delete_directory = smbd_can_delete_directory,
.change_to_root_user = smbd_change_to_root_user,
-
+
.contend_level2_oplocks_begin = smbd_contend_level2_oplocks_begin,
.contend_level2_oplocks_end = smbd_contend_level2_oplocks_end,
diff --git a/source3/smbd/msg_idmap.c b/source3/smbd/msg_idmap.c
index b534ac3..e87b313 100644
--- a/source3/smbd/msg_idmap.c
+++ b/source3/smbd/msg_idmap.c
@@ -156,7 +156,7 @@ static void message_idmap_flush(struct messaging_context *msg_ctx,
struct server_id server_id,
DATA_BLOB* data)
{
- const char* msg = data ? (const char*)data->data : NULL;
+ const char *msg = data ? (const char *)data->data : NULL;
if ((msg == NULL) || (msg[0] == '\0')) {
flush_gid_cache();
@@ -172,14 +172,14 @@ static void message_idmap_flush(struct messaging_context *msg_ctx,
static void message_idmap_delete(struct messaging_context *msg_ctx,
- void* private_data,
+ void *private_data,
uint32_t msg_type,
struct server_id server_id,
DATA_BLOB* data)
{
- const char* msg = (data && data->data) ? (const char*)data->data : "<NULL>";
+ const char *msg = (data && data->data) ? (const char *)data->data : "<NULL>";
bool do_kill = (msg_type == MSG_IDMAP_KILL);
- struct user_struct* validated_users = smbd_server_conn->smb1.sessions.validated_users;
+ struct user_struct *validated_users = smbd_server_conn->smb1.sessions.validated_users;
struct id id;
if (!parse_id(msg, &id)) {
@@ -187,7 +187,7 @@ static void message_idmap_delete(struct messaging_context *msg_ctx,
return;
}
- if( do_kill && id_in_use(validated_users, &id) ) {
+ if (do_kill && id_in_use(validated_users, &id)) {
exit_server_cleanly(msg);
} else {
delete_from_cache(&id);
--
Samba Shared Repository
More information about the samba-cvs
mailing list