Re: [Openais] [corosync] [patch] - Use clock_gettime for timers

2009-07-22 Thread Jim Meyering
Jan Friesse wrote: 5) +nano_monotonic_hz = ts.tv_sec + 10ULL / (unsigned long long )ts. BTW, that cast appears to be unnecessary, since the value (ts.tv_nsec, I presume) will be promoted to the width of the other argument to /, which is already ULL. Remember: all casts are bad.

[Openais] make syntax-check failed

2009-06-30 Thread Jim Meyering
My gnulib-added (not public yet, pending legal opinion) make syntax-check failed due to some newly-added trailing blanks and a useless inclusion of signal.h. With these changes, those tests now pass. From c69f13f86766d07106464f2951001eb686e5b5db Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer

Re: [Openais] [PATCH] openais/trunk: fix make install CP definition

2009-06-29 Thread Jim Meyering
Fabio M. Di Nitto wrote: Fairly obvious change Obvious fix, indeed. Without that, $(CP) isn't defined. Index: configure.ac === --- configure.ac (revision 2008) +++ configure.ac (working copy) @@ -229,6 +229,7 @@

Re: [Openais] [PATCH] corosync/trunk: fix/improve rpm package versioning

2009-06-26 Thread Jim Meyering
Fabio M. Di Nitto wrote: Hi, extra integration testing did show a series of issues with rpm autogenerated version system. the following patch addresses them. Issues details: 1) a version trunk-1.r1234 is 0.XX release breaking upgrade paths from release X to trunk to release X+1. 2)

Re: [Openais] [PATCH] corosync/trunk: fix make dist target

2009-06-25 Thread Jim Meyering
Fabio M. Di Nitto wrote: the make dist target was not including the init/ scripts. this bug was hidden very well from the toplevel Makefile that generates tarball releases. patch in attachment fixes it. That looks fine. Only nit is that this line in the new file is redundant:

Re: [Openais] [PATCH] corosync/trunk: add support for make rpm and make srpm targets

2009-06-25 Thread Jim Meyering
Fabio M. Di Nitto wrote: Howto: svn co... ./autogen.sh ./configure make rpm or make srpm The resulting srpm can be built _without_ autotools installed and the resulting rpm is equivalent of the one you would get from Fedora rawhide. I know what you mean, but just to clarify: -

Re: [Openais] [PATCH] corosync/trunk: fix make dist target

2009-06-25 Thread Jim Meyering
Fabio M. Di Nitto wrote: On Thu, 2009-06-25 at 12:43 +0200, Jim Meyering wrote: Fabio M. Di Nitto wrote: the make dist target was not including the init/ scripts. this bug was hidden very well from the toplevel Makefile that generates tarball releases. patch in attachment fixes

Re: [Openais] [PATCH] corosync/trunk: add support for make rpm and make srpm targets

2009-06-25 Thread Jim Meyering
Fabio M. Di Nitto wrote: Hi Jim, thanks for the input.. patch take2 in attachment should address all your bits. ... +$(SPEC): $(SPEC).in + LC_ALL=C date=$(shell date +%a %b %d %Y) \ + alphatag=$(shell svnversion) \ + sed \ + -e s...@alphatag@#r$$alphatag#g \ +

Re: [Openais] [PATCH corosync] totemsrp: remove unnecessary cast to avoid make syntax-check failure

2009-06-21 Thread Jim Meyering
Steven Dake wrote: On Sun, 2009-06-21 at 18:59 +0200, Jim Meyering wrote: ... diff --git a/exec/totemsrp.c b/exec/totemsrp.c index f0501a9..94bb37b 100644 --- a/exec/totemsrp.c +++ b/exec/totemsrp.c @@ -4023,7 +4023,7 @@ static int message_handler_memb_join ( int

[Openais] [PATCH openais 2/9] avoid useless if before free

2009-06-21 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/msg.c (message_handler_req_exec_msg_queueopen): Remove unnecessary if before free. (message_handler_req_exec_msg_queueopenasync): Likewise. (message_handler_req_exec_msg_messageget): Likewise. --- services/msg.c |9 +++-- 1 files changed

[Openais] [PATCH openais 9/9] sync with pkgconfig/Makefile.am from corosync

2009-06-21 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * pkgconfig/Makefile.am (lib%.pc): Sync with same rule from corosync, to avoid triggering make syntax-check failure. --- pkgconfig/Makefile.am |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgconfig/Makefile.am b/pkgconfig

[Openais] [PATCH openais 6/9] remove trailing blanks

2009-06-21 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * lib/lck.c (saLckResourceOpenAsync, saLckResourceLockAsync): * services/lck.c (lck_sync_resource_lock_timer_stop, lck_unlock): (message_handler_req_exec_lck_resourceclose): --- lib/lck.c |4 ++-- services/lck.c |6 +++--- 2 files changed, 5

Re: [Openais] gnulib syntax-check preparation

2009-06-21 Thread Jim Meyering
Steven Dake wrote: all patches look good except for gnulib integration which i want to hold until after 1.0.0 and legal review re licensing. On Sun, 2009-06-21 at 20:42 +0200, Jim Meyering wrote: I've prepared a minimal patch to introduce openais to gnulib gently. The first patch is solely

Re: [Openais] gnulib syntax-check preparation

2009-06-21 Thread Jim Meyering
Steven Dake wrote: all patches look good except for gnulib integration which i want to hold until after 1.0.0 and legal review re licensing. Committed those 8. ___ Openais mailing list Openais@lists.linux-foundation.org

[Openais] trailing blanks have snuck back in

2009-06-19 Thread Jim Meyering
:]]+$') From eda49d6fa8b59dcc58f66b4f5fbb35c6ef315b78 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Fri, 19 Jun 2009 12:35:51 +0200 Subject: [PATCH] maint: remove trailing blanks By running this command from a git-cloned directory: perl -pi -e 's/[ \t]+$//' $(git grep -E

[Openais] [PATCH] autogen.sh: simply to a one-liner: autoreconf -i

2009-06-17 Thread Jim Meyering
Jan Friesse mentioned that the existing use of which in autogen.sh was causing trouble on a fresh F11 install (it's not installed). I propose to replace that file with a one-liner: From d0c4fa62fadebaa801997a619e7b2bc2cd8c14d9 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date

Re: [Openais] [PATCH] build: silence automake portability warnings

2009-06-17 Thread Jim Meyering
Jan Friesse wrote: Jim, OpenAIS need some love too. Jim Meyering wrote: Without this patch, running automake provokes this: exec/Makefile.am:66: SHARED_LIBS:%.so.$(SONAME: non-POSIX variable name exec/Makefile.am:67: SHARED_LIBS:%.so.$(SONAME: non-POSIX variable name ;-) Here you go

Re: [Openais] [PATCH] don't let a NUL input byte cause memory corruption (line[-1] = 0; )

2009-06-04 Thread Jim Meyering
Jan Friesse wrote: Jim, ACK from me, but only amfutil does make sense. We will throw away openaisparser and replace it by coroparse, which doesn't have this problem, it's able to handle EOLs like \r, \n, \r\n, and handle lines without newline. At least I hope this is still plan, before 1.0.

[Openais] new gcc warning uncovers nasty bug

2009-06-02 Thread Jim Meyering
, this was introduced 11 months ago, with this change: svn+ssh://svn.fedorahosted.org/svn/corosync/tr...@1582 Here's the fix: From fcbd110557905142b87a5e47bdd8c140441aa848 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 2 Jun 2009 17:58:22 +0200 Subject: [PATCH] totempg.c: don't

Re: [Openais] new gcc warning uncovers nasty bug

2009-06-02 Thread Jim Meyering
Steven Dake wrote: good for merge committed ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

Re: [Openais] [lck 2/7] Sizeof should be structure and not pointer

2009-06-02 Thread Jim Meyering
Steven Dake wrote: On Tue, 2009-06-02 at 18:11 +0200, Jim Meyering wrote: Ryan O'Hara wrote: This patch is correct, but what I intended was to use sizeof (struct resource_instance). Can we do that instead? Please try to move to sizeof (VARIABLE). I really don't prefer this because people

Re: [Openais] [corosync trunk] [patch] Initial support for security (uid-gid)

2009-05-19 Thread Jim Meyering
Fabio M. Di Nitto wrote: @@ -150,6 +162,10 @@ void corosync_request_shutdown (void) poll_stop (0); totempg_finalize (); coroipcs_ipc_exit (); + + /*Remove uidgid_list*/ + corosync_remove_uidgid_list (); Is there really a need to free this list on exit?

[Openais] corosync: use gnulib

2009-05-18 Thread Jim Meyering
Hi, The following patch series is a gentle (I hope) and superficial introduction to making corosync gnulib-enabled. It adds only a few modules and uses only one in actual C code, and that in a trivial way. The main benefit of this first step is that with it, you can run make syntax-check to

[Openais] [PATCH 3/9] exec/schedwrk.c: include config.h

2009-05-18 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- exec/schedwrk.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/exec/schedwrk.c b/exec/schedwrk.c index a08dfb8..0c330e9 100644 --- a/exec/schedwrk.c +++ b/exec/schedwrk.c @@ -32,6 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE

[Openais] [PATCH 1/9] remove trailing blanks

2009-05-18 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- SECURITY | 12 ++-- configure.ac |2 +- exec/totemsrp.c |4 ++-- include/corosync/corodefs.h |2 +- include/corosync/coroipc_ipc.h |2 +- include/corosync

[Openais] [PATCH 5/9] don't include assert.h when it's not used

2009-05-18 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/apidef.c: Likewise. * exec/mainconfig.c: Likewise. * exec/service.c: Likewise. * exec/timer.c: Likewise. * exec/totemconfig.c: Likewise. * exec/totemmrp.c: Likewise. * exec/vsf_quorum.c: Likewise. * services/testquorum.c: Likewise. * test/cpgbench.c

[Openais] [PATCH 4/9] always include config.h before any other file

2009-05-18 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * test/cpgbench.c: Include config.h before any other file. * test/cpgbenchzc.c: Ditto. --- test/cpgbench.c |2 +- test/cpgbenchzc.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cpgbench.c b/test/cpgbench.c index

[Openais] [PATCH 7/9] avoid spurious failure of 'make syntax-check's sc_makefile_check

2009-05-18 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * pkgconfig/Makefile.am (lib%.pc): Add extra quotes to avoid triggering check for use of obsolescent @VAR@ notation. --- pkgconfig/Makefile.am | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgconfig/Makefile.am b

[Openais] [PATCH 6/9] don't include signal.h when it's not used

2009-05-18 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/coroparse.c: Likewise. * exec/quorum.c: Likewise. * exec/sync.c: Likewise. * exec/totemmrp.c: Likewise. * exec/totemnet.c: Likewise. * exec/totemrrp.c: Likewise. * exec/totemsrp.c: Likewise. * exec/vsf_quorum.c: Likewise. * exec/vsf_ykd.c: Likewise

[Openais] [PATCH 9/9] use gnulib's verify macro

2009-05-18 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/confdb.c: Include gnulib's verify.h. (m2h): Use it. * services/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib --- services/Makefile.am |8 +--- services/confdb.c|5 ++--- 2 files changed, 7 insertions(+), 6 deletions

[Openais] [PATCH 8/9] add the beginnings of gnulib support

2009-05-18 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com bootstrap: New file. cfg.mk: New file: disable some failing syntax-checks, for now .prev-version: New file. * configure.ac: Use build-aux/. Invoke gl_EARLY and gl_INIT. (AC_CONFIG_FILES): Add gnulib/lib/Makefile and gnulib/tests/Makefile. * Makefile.am

Re: [Openais] [PATCH 00/11] Enable -Wshadow, eliminate warnings

2009-05-11 Thread Jim Meyering
Steven Dake wrote: This entire patch set looks good. Thanks. Committed. ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

Re: [Openais] [PATCH] totemnet.c: Make totemnet_initialize definition match just-changed decl.

2009-05-11 Thread Jim Meyering
Fabio M. Di Nitto wrote: good to go in... Thanks. committed ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

[Openais] [PATCH 03/11] amfsg.c: avoid shadowing

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- services/amfsg.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/services/amfsg.c b/services/amfsg.c index 566b1ae..d167220 100644 --- a/services/amfsg.c +++ b/services/amfsg.c @@ -1391,29 +1391,30 @@ static inline

[Openais] [PATCH 02/11] amf.c: avoid shadowing warnings

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/amf.c: Rename file-scoped global var, hostname to g_hostname (amf_exec_init_fn): Update uses. (amf_confchg_fn): Likewise. --- services/amf.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/amf.c b/services

[Openais] [PATCH 04/11] testevt.c: avoid shadowing warnings

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * test/testevt.c: Rename file-scoped globals not to shadow locals. Make them static, too. --- test/testevt.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/testevt.c b/test/testevt.c index f962edf

[Openais] [PATCH 07/11] amfapp.c: avoid shadowing warning

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/amfapp.c (all_sg_assigned): Rename local not to shadow the name of this function. --- services/amfapp.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/amfapp.c b/services/amfapp.c index a8737f7..84e2cb4

[Openais] [PATCH 05/11] amfcomp.c: avoid shadowing warning

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/amfcomp.c (comp_recover_action): Rename inner-scoped node not to shadow outer-scoped variable by the same name. --- services/amfcomp.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/amfcomp.c b/services

[Openais] [PATCH 11/11] configure.ac: enable -Wshadow warnings

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * configure.ac (WARNLIST): Add shadow. --- configure.ac |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index a585fb1..02bd770 100644 --- a/configure.ac +++ b/configure.ac @@ -267,6 +267,7 @@ WARNLIST

[Openais] [PATCH 06/11] amfnode.c: avoid shadowing warning

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/amfnode.c (has_all_sg_on_node_failed_over): Rename local not to shadow the name of this function. --- services/amfnode.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/amfnode.c b/services/amfnode.c index

[Openais] [PATCH 08/11] services/msg.c: avoid shadowing warning

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Rename locals that shadow file-scoped globals: s/queue_list_head/head/ and s/group_list_head/head/: * services/msg.c (msg_print_group_member_list) (msg_print_queue_list, msg_print_group_list) (msg_find_group_member, msg_find_queue_id, msg_find_queue

[Openais] [PATCH 10/11] services/msg.c: avoid warnings: add const to two parameters

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/msg.c (msg_cancel_queue_pending) (msg_release_queue_pending, msg_sync_queue_transmit): --- services/msg.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/msg.c b/services/msg.c index 29fd867..2b4a39a 100644

[Openais] [PATCH 09/11] services/evt.c: avoid shadowing warnings

2009-05-07 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/evt.c: Rename file-scoped global nl to node_list to avoid shadowing a function parameter. (lookup_node): Rename local to avoid shadowing the obsolete strings.h function. --- services/evt.c |8 1 files changed, 4 insertions(+), 4

Re: [Openais] [PATCH] fix missing-dependency bug, so as not to install bogus .pc files

2009-05-06 Thread Jim Meyering
Jim Meyering wrote: I configured corosync with one prefix, then reran configure with the proper --prefix=DIR option, but the prior, bogus value stuck and ended up being installed. That made it so a subsequent attempt to build openais failed, due to using an invalid -I/bogus/prefix option

[Openais] [PATCH] lib/msg.c: fix typo: s/= open_flags/= openFlags/

2009-05-06 Thread Jim Meyering
openais' trunk currently doesn't compile due to a typo: msg.c:409: error: ‘open_flags’ undeclared (first use in this function) This appears to be what was intended: From 7f8725f931ecd99f9dc62f96f393cd97988804b0 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Wed, 6 May

Re: [Openais] [PATCH] lib/msg.c: fix typo: s/= open_flags/= openFlags/

2009-05-06 Thread Jim Meyering
Steven Dake wrote: good for merge thanks. committed ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

[Openais] [PATCH] pkgconfig/Makefile.am: missing dep fix; generate-read-only

2009-05-06 Thread Jim Meyering
: Jim Meyering meyer...@redhat.com Date: Wed, 6 May 2009 09:08:59 +0200 Subject: [PATCH] pkgconfig/Makefile.am: missing dep fix; generate-read-only * pkgconfig/Makefile.am: Merge fixes from corosync. (clean-local): Remove rule. Assign to CLEANFILES instead. --- pkgconfig/Makefile.am | 24

Re: [Openais] [PATCH] pkgconfig/Makefile.am: missing dep fix; generate-read-only

2009-05-06 Thread Jim Meyering
Steven Dake wrote: As long as it passes make distcheck, then good for commit It does, so I've committed it. ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

[Openais] [PATCH: corosync] avoid new warnings

2009-05-04 Thread Jim Meyering
There were some new warnings due to const mismatches and one unused static declaration. This fixes the offenders. From 3cff529156719f6a7557a7133403aa80dabbc1c0 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 4 May 2009 10:35:59 +0200 Subject: [PATCH] avoid new warnings

[Openais] [PATCH] fix missing-dependency bug, so as not to install bogus .pc files

2009-05-04 Thread Jim Meyering
the fix: From cce288d20523f47763e1be356a33ffc6c8eda9ad Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 4 May 2009 14:05:46 +0200 Subject: [PATCH] fix missing-dependency bug, so as not to install bogus .pc files * pkgconfig/Makefile.am (all .pc files): Depend on Makefile, so

Re: [Openais] [PATCH: corosync] avoid new warnings

2009-05-04 Thread Jim Meyering
Jim Meyering wrote: There were some new warnings due to const mismatches and one unused static declaration. This fixes the offenders. From 3cff529156719f6a7557a7133403aa80dabbc1c0 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 4 May 2009 10:35:59 +0200 Subject

Re: [Openais] make corosync and openais work together with arbitrary --prefix

2009-04-24 Thread Jim Meyering
Steven Dake wrote: what is corosync_LIBS defined to? I only want libcoroipcc.so linked to files in the lib directory. corosync_LIBS was always empty. I've adjusted the patch accordingly: From 4668b6361551d73799cc14a2db99fd4ae7076e4f Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer

[Openais] [PATCH 1/4] logsys.c: avoid an unnecessary strlen call

2009-04-23 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/logsys.c (strcpy_cutoff): Use strlen, then memcpy, not strcpy, then strlen. --- exec/logsys.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exec/logsys.c b/exec/logsys.c index 994cf21..08df1e2 100644 --- a/exec

Re: [Openais] pkg-config tweaks for corosync

2009-04-23 Thread Jim Meyering
Steven Dake wrote: looks good for merge Thanks. committed ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

Re: [Openais] [PATCH] perf: avoid writing 1MB of zero bytes

2009-04-22 Thread Jim Meyering
Steven Dake wrote: good for merge Subject: [PATCH] perf: avoid writing 1MB of zero bytes Don't initialize the entire just-allocated buffer to all zeroes. The very next lines initialize all members except data. * exec/totempg.c (assembly_ref): Initialize the first byte of assembly-data to

Re: [Openais] [PATCH] rewrite strstr_rs not to use strdup (avoid low-mem NULL-deref)

2009-04-21 Thread Jim Meyering
Jim Meyering wrote: Jim Meyering wrote: Under memory pressure, the use of strdup in strstr_rs could return NULL, and that return value would then be dereferenced. The following change replaces that function with this far simpler one and removes a second copy of the original. char

[Openais] [PATCH] perf: avoid writing 1MB of zero bytes

2009-04-21 Thread Jim Meyering
Looked at a leak mentioned on IRC and saw a large amount of waste... This looks easy and safe to avoid: From b5550f22ceefb0941198810370c9ed1c04301992 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 21 Apr 2009 21:25:48 +0200 Subject: [PATCH] perf: avoid writing 1MB

[Openais] [PATCH] logsys.c: avoid an unnecessary strlen call

2009-04-20 Thread Jim Meyering
Steve mentioned that strlen is appearing a little too high in profiling, so this removes one redundant use from what is probably a hot code path. I will do the same to the else block next. From 51eaaa809ac94ec20ddcbe62c651735106128a31 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer

Re: [Openais] [PATCH] corosync/trunk: logsys handles more error handling

2009-04-20 Thread Jim Meyering
Fabio M. Di Nitto wrote: This patch fixes one exit path error handling in logsys_format_set and add 2 error checks when returning from logsys_config_file_set_unlocked. Fabio Index: exec/logsys.c === ... @@ -1248,13 +1253,14

[Openais] [PATCH] schedwrk.c: avoid two int-pointer cast conversion warnings

2009-04-20 Thread Jim Meyering
itself isn't polluted with ugly union uses. From 780a5700934fec90c76b672312b1d91e7521f752 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 20 Apr 2009 12:26:43 +0200 Subject: [PATCH] schedwrk.c: avoid two int-pointer cast conversion warnings * exec/schedwrk.c (void2handle

[Openais] [PATCH] services/confdb.c: avoid four warnings

2009-04-20 Thread Jim Meyering
:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 20 Apr 2009 16:17:05 +0200 Subject: [PATCH] services/confdb.c: avoid four warnings * services/confdb.c (m2h): New function. (message_handler_req_lib_confdb_object_iter): Use m2h rather than a cast. (message_handler_req_lib_confdb_object_find

[Openais] [PATCH: corosync] remove useless if-before-free tests

2009-04-20 Thread Jim Meyering
/gmane.emacs.devel/98144 http://thread.gmane.org/gmane.comp.lib.glibc.alpha/13092 From 95b970874b21705884ce45e4c3c44d5fc2318968 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 20 Apr 2009 16:43:34 +0200 Subject: [PATCH] remove useless if-before-free tests * exec/coropoll.c

Re: [Openais] [PATCH] schedwrk.c: avoid two int-pointer cast conversion warnings

2009-04-20 Thread Jim Meyering
Steven Dake wrote: good for merge. On Mon, 2009-04-20 at 12:29 +0200, Jim Meyering wrote: Here are two warnings: schedwrk.c:52: warning: cast from pointer to integer of different size schedwrk.c:110: warning: cast to pointer from integer of different size Thanks. committed

[Openais] [PATCH] corosync-cfgtool.c: handle strdup failure gracefully

2009-04-20 Thread Jim Meyering
This fixes the last of the unchecked-strdup problems: From 143bf3681c180c0dd8c14596fde240808827615a Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 20 Apr 2009 18:51:46 +0200 Subject: [PATCH] corosync-cfgtool.c: handle strdup failure gracefully * tools/corosync

Re: [Openais] [PATCH] corosync-keygen.c: diagnose a few more failures

2009-04-15 Thread Jim Meyering
Steven Dake wrote: looks good On Fri, 2009-04-10 at 09:03 +0200, Jim Meyering wrote: Date: Fri, 10 Apr 2009 09:02:36 +0200 Subject: [PATCH] corosync-keygen.c: diagnose a few more failures * tools/corosync-keygen.c (main): Diagnose short reads, failed mkdir and fchmod; detect write failure

Re: [Openais] two small patches

2009-04-15 Thread Jim Meyering
Steven Dake wrote: looks good regards -steve On Fri, 2009-04-10 at 18:58 +0200, Jim Meyering wrote: From 01aaca1325f4dedd3f0be0bab7fd753a83f3e0b1 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Fri, 10 Apr 2009 18:00:01 +0200 Subject: [PATCH 1/2] change a few int

Re: [Openais] totemrrp.h, totemsrp.h, totemnet.h: const+size_t

2009-04-15 Thread Jim Meyering
Steven Dake wrote: Try using this patch with your patchset. It makes a copy of the constant void *msg into a new merge_detect struct. If it looks good go ahead and merge in with your changes on wednesday. That looks fine and confirms that msg should remain const. I've just committed your

[Openais] [PATCH] totemsrp.c: more const propagation

2009-04-15 Thread Jim Meyering
it in the log. The rest are pretty straightforward. From 5badb9617e4adf923a2845ca97096aa2c2f49753 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Wed, 15 Apr 2009 11:15:39 +0200 Subject: [PATCH] totemsrp.c: more const propagation * exec/totemsrp.c (message_handler_memb_commit_token

[Openais] [PATCH 06/15] don't shadow file-scoped global, handle

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * test/testquorum.c: Rename: s/handle/g_handle/. --- test/testquorum.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/testquorum.c b/test/testquorum.c index 9139f3f..74b97ec 100644 --- a/test/testquorum.c +++ b/test

[Openais] [PATCH 08/15] coroipcs.c: don't shadow functions read and write

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/coroipcs.c (req_setup_recv): rename locals: s/read/n_read/; s/write/n_write. Also declare param to be const. --- exec/coroipcs.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/exec/coroipcs.c b/exec

[Openais] [PATCH 15/15] cpg.c: rename file-scoped global to avoid shadowing warnings

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/cpg.c: s/req_exec_cpg_downlist/g_req_exec_cpg_downlist/ --- services/cpg.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/services/cpg.c b/services/cpg.c index f60427a..2be795e 100644 --- a/services

[Openais] [PATCH 05/15] wthread.c: Rename file-scoped type to avoid shadows.

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/wthread.c (struct worker_thread_t): Rename from struct worker_thread. (start_worker_thread): Rename from function worker_thread. * exec/wthread.h (struct worker_thread_group) [threads]: Update member type: s/struct worker_thread/struct worker_thread_t

[Openais] [PATCH 09/15] configure.ac: enable gcc's -Wshadow warning

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * configure.ac (WARNLIST): Add -Wshadow to the list. --- configure.ac |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 4b034f8..3d5b15e 100644 --- a/configure.ac +++ b/configure.ac @@ -262,6 +262,7

[Openais] [PATCH 10/15] corosync-fplay.c: avoid shadowin: s/index/idx/

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * tools/corosync-fplay.c (printer_totempg_mcast_fits): --- tools/corosync-fplay.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/corosync-fplay.c b/tools/corosync-fplay.c index 9eed9f7..2c53383 100644 --- a/tools/corosync

[Openais] [PATCH 03/15] list.h: avoid shadowing warning

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * include/corosync/list.h: Don't use remove as param name. --- include/corosync/list.h | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/corosync/list.h b/include/corosync/list.h index e9df38b..1790a69 100644

[Openais] [PATCH 11/15] testvotequorum1.c: don't shadow file-scoped global, handle

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * test/testvotequorum1.c (main): Rename: s/handle/g_handle/. --- test/testvotequorum1.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/testvotequorum1.c b/test/testvotequorum1.c index b8f0648..5050ba7 100644

[Openais] [PATCH 02/15] coroipcc.c: avoid shadowing warning

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * lib/coroipcc.c: Don't use read as param name. --- lib/coroipcc.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/coroipcc.c b/lib/coroipcc.c index 038ded8..cc3a540 100644 --- a/lib/coroipcc.c +++ b/lib/coroipcc.c

[Openais] [PATCH 01/15] totemsrp.c: more const propagation

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/totemsrp.c (message_handler_memb_commit_token): Don't cast away const on memb_commit_token. This exposed a const violation. Fix that with minor rearrangement and an added memcpy. --- exec/totemsrp.c | 64

[Openais] [PATCH 04/15] don't shadow the global type name, timer_handle

2009-04-15 Thread Jim Meyering
From: Jim Meyering meyer...@vv.meyering.net.meyering.net * exec/coropoll.c (poll_timer_delete): Rename locals and/or params. * exec/timer.c (corosync_timer_delete): Likewise. (corosync_timer_expire_time_get): Likewise. * exec/tlist.h (timerlist_del, timerlist_expire_time): Likewise

Re: [Openais] [PATCH 01/15] totemsrp.c: more const propagation

2009-04-15 Thread Jim Meyering
Jim Meyering wrote: From: Jim Meyering meyer...@redhat.com * exec/totemsrp.c (message_handler_memb_commit_token): Don't cast away const on memb_commit_token. This exposed a const violation. Fix that with minor rearrangement and an added memcpy. --- exec/totemsrp.c | 64

Re: [Openais] [PATCH 14/15] vsf_ykd.c: Rename param to avoid shadowing global ydk_state

2009-04-15 Thread Jim Meyering
Steven Dake wrote: this patchset looks fine Thanks for the review. Committing all 15 of them now. ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

[Openais] [PATCH] corosync-keygen.c: diagnose a few more failures

2009-04-10 Thread Jim Meyering
From b043c36eb1b575acc54c971b5eb14020e73d9abd Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Fri, 10 Apr 2009 09:02:36 +0200 Subject: [PATCH] corosync-keygen.c: diagnose a few more failures * tools/corosync-keygen.c (main): Diagnose short reads, failed mkdir and fchmod

[Openais] totemrrp.h, totemsrp.h, totemnet.h: const+size_t

2009-04-10 Thread Jim Meyering
the memb_merge_detect_endian_convert call Let me know and I'll adjust. From 8a10c661510738bb59bd9685debd9e0162158814 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Fri, 10 Apr 2009 10:37:29 +0200 Subject: [PATCH] totemrrp.h, totemsrp.h, totemnet.h: const+size_t * exec/totemrrp.c

[Openais] two small patches

2009-04-10 Thread Jim Meyering
From 01aaca1325f4dedd3f0be0bab7fd753a83f3e0b1 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Fri, 10 Apr 2009 18:00:01 +0200 Subject: [PATCH 1/2] change a few int msg_len to size_t msg_len; adjust docs * lib/cpg.c (cpg_mcast_joined): * lib/evs.c (evs_mcast_joined

[Openais] [PATCH 4/9] Propagate the above into vsf_quorum.c.

2009-04-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/vsf_quorum.c: add const to msg param. --- exec/vsf_quorum.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/exec/vsf_quorum.c b/exec/vsf_quorum.c index dc05458..45f537e 100644 --- a/exec/vsf_quorum.c +++ b

[Openais] [PATCH 2/9] coroapi.h: change lib_handler_fn's *msg to be const

2009-04-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Make a tiny type change and watch it propagate. * include/corosync/engine/coroapi.h (struct corosync_lib_handler) [lib_handler_fn]: Change type of 2nd parameter: s/void *msg/const void *msg/. --- include/corosync/engine/coroapi.h |2 +- 1 files changed

[Openais] [PATCH 6/9] * services/pload.c: Likewise

2009-04-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- services/pload.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/pload.c b/services/pload.c index 2dbe974..424abe6 100644 --- a/services/pload.c +++ b/services/pload.c @@ -91,7 +91,7 @@ static void

[Openais] [PATCH 1/9] testevsth.c: const+size_t: evs_deliver_fn, evs_confchg_fn

2009-04-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- test/testevsth.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/testevsth.c b/test/testevsth.c index 1d74f7d..9a1635d 100644 --- a/test/testevsth.c +++ b/test/testevsth.c @@ -47,7 +47,7 @@ char *delivery_string

[Openais] [PATCH 7/9] coroipcs.h: update signature of coroipcs_handler_fn_lvalue to match

2009-04-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/coroipcs.h: signature of coroipcs_handler_fn_lvalue must match that of lib_handler_fn; noted via main.c. --- exec/coroipcs.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/exec/coroipcs.h b/exec/coroipcs.h index 60b63d2

[Openais] [PATCH 8/9] * services/cpg.c: Likewise.

2009-04-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- services/cpg.c | 56 +--- 1 files changed, 33 insertions(+), 23 deletions(-) diff --git a/services/cpg.c b/services/cpg.c index 7bae0fd..f60427a 100644 --- a/services/cpg.c +++ b/services/cpg.c

[Openais] [PATCH 3/9] Propagate the above into cfg.c and votequorum.c.

2009-04-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/cfg.c (message_handler_req_lib_cfg_get_node_addrs): Constification exposed a bug in this function whereby it mistakenly modified storage through its now-const *msg parameter. Since it did that solely to store a temporary result, we've changed

[Openais] [PATCH 5/9] propagate to evc.c

2009-04-09 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * services/evs.c: add const to msg param --- services/evs.c | 46 +++--- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/services/evs.c b/services/evs.c index 389af98..24fff4d 100644 --- a/services

Re: [Openais] another big batch of API changes

2009-04-09 Thread Jim Meyering
Jim Meyering wrote: Here is a tiny API change, along with the many changes it induces. 0001 is just something I saw along the way. 0002 is the tiny change that the adjustments in all of the following. Here's that tiny diff: diff --git a/include/corosync/engine/coroapi.h

Re: [Openais] API change vestiges

2009-04-09 Thread Jim Meyering
Jim Meyering wrote: Here are a few more. From 052f43f2c3ec1a1a7d6a2e9038ee1fb0e7d222e9 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Thu, 2 Apr 2009 22:18:51 +0200 Subject: [PATCH 1/2] cpg.h, objdb.h, coroaph.h: more const/size_t * include/corosync/cpg.h

[Openais] [PATCH 4/4] sync.c: avoid printf format warning

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/sync.c (sync_deliver_fn): cast to unsigned long int, use %lu --- exec/sync.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/exec/sync.c b/exec/sync.c index a7d7f6b..6521c84 100644 --- a/exec/sync.c +++ b/exec/sync.c

[Openais] [PATCH 3/4] sync.c: avoid warning about now-unused variables

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/sync.c (vsf_none, vsf_iface): Remove decls of now-unused file-scoped variables. --- exec/sync.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/exec/sync.c b/exec/sync.c index 21a1a67..a7d7f6b 100644 --- a/exec/sync.c

[Openais] making all iov_len unsigned int; not int and not size_t

2009-04-08 Thread Jim Meyering
These changes make all iov_len (and iov_len_in) variables be of type unsigned int. I performed the changes mechanically after verifying yesterday by a relatively quick code inspection that the signed-unsigned change would be ok. There were also some declarations that were of type size_t

[Openais] [PATCH 1/4] Convert all int iov_len decls to unsigned int iov_len.

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Used this command: git grep -l 'int iov_len' \ | xargs perl -pi -e 's/((?:^|,)\s*)(int iov_len)/${1}unsigned $2/' Here's an approximate (autogenerated by vc-chlog) list of affected file names and functions/macros: * README.devmap: * exec/coroipcs.c

[Openais] [PATCH 04/11] totemconfig.c: don't let a key of length 128 clobber memory

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/totemconfig.c (totem_config_keyread): Reject a key with length greater than that of our private_key buffer. --- exec/totemconfig.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/exec/totemconfig.c b/exec/totemconfig.c

[Openais] another big batch of API changes

2009-04-08 Thread Jim Meyering
Here is what should be the last big public API change. I've tried to separate the change-sets that modify public .h files from those that adjust corresponding .c files, in an attempt to make this easier to review. Of course, one consequence is that after applying 0007 and 0009, but without the

  1   2   3   >