[PATCH] Replication patches, second try
Jim Meyering
jim at meyering.net
Tue Oct 5 19:01:39 UTC 2010
Jeff Darcy wrote:
> On 10/05/2010 01:28 PM, Jim Meyering wrote:
>> That works by chance, since "item" is the name of the local variable
>> used in the two places where xpthread_create is called.
>> "item" should be added as a macro parameter, as in my proposed
>> stand-alone bug-fix patch.
>
> IMO it shouldn't be a macro at all,
I too avoid macros as much as possible, but in order
to return NULL (and thus minimizing the changes to the
original code), it must be a macro.
For the record, I find that indenting with TABs is incompatible
with the common (and worthwhile) don't-use-more-than-80-columns
guideline. In this case, it results in the slightly tortured
code like this:
for (;;) {
...
switch (item->type) {
case REPL_PUT:
if (pipe(item->pipes) >= 0) {
xpthread_create(&prod, (proxy_host
? proxy_repl_prod
: proxy_repl_prod_fs),
item,
"failed to start producer thread");
xpthread_create(&cons,proxy_repl_cons,item,
"failed to start consumer thread");
pthread_join(prod,NULL);
pthread_join(cons,NULL);
}
Would you mind, once there are few pending changes from any of us,
if I were to reformat the C sources using only spaces for indentation
and a smaller number of columns, say 4 for each indentation level?
More information about the iwhd-devel
mailing list