[PATCH] fixes for ctdb/server/eventscript.c
Volker Lendecke
Volker.Lendecke at SerNet.DE
Fri Mar 13 09:25:13 MDT 2015
On Fri, Mar 13, 2015 at 04:18:06PM +0100, Michael Adam wrote:
> > + for (i = 0; i < count; i++) {
>
> I personally would prefer this as even better to read:
>
> for (i = 0; i < scripts->num_scripts; i++)
>
> but that's just my taste.
"count" denotes what came out of scandir, thus it is the array length
for "namelist", the source of our copy operation. scripts->num_scripts
denotes the number of scripts->scripts elements, the destination. Both
are the same. From my pov both are really equivalent, but "count" has the
advantage to generate less code. No pointer dereference. I know, this
is so way beyond being measurable, but if both are really the *exact*
same thing, I'd prefer the simpler one.
If you really want scripts->num_scripts, feel free :-)
> > From 36232e0ec01a2617603a2f90903d8cdadb69bc81 Mon Sep 17 00:00:00 2001
> > From: Volker Lendecke <vl at samba.org>
> > Date: Fri, 13 Mar 2015 14:20:05 +0000
> > Subject: [PATCH 5/5] ctdb: Fix 1125613 Destination buffer too small
>
> What is 1125613 ? covetrity id?
Right. I forgot the "CID". Do you want me to add it and re-send?
Thanks!
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list