David you have to be really careful when you change things like this in loops.
The effect of your change is that once one match is found, *everything* from then on is deleted. The best policy i think is to *copy* the declaration to the new location and change the existing one to an assignment. That way you cant go wrong. Andrew On 5/26/06, linux-ha-cvs@lists.linux-ha.org <linux-ha-cvs@lists.linux-ha.org> wrote:
linux-ha CVS committal Author : davidlee Host : Project : linux-ha Module : lib Dir : linux-ha/lib/crm/common Modified Files: utils.c Log Message: Declarations should precede code =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/utils.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -3 -r1.52 -r1.53 --- utils.c 22 May 2006 08:31:53 -0000 1.52 +++ utils.c 26 May 2006 08:46:07 -0000 1.53 @@ -1,4 +1,4 @@ -/* $Id: utils.c,v 1.52 2006/05/22 08:31:53 andrew Exp $ */ +/* $Id: utils.c,v 1.53 2006/05/26 08:46:07 davidlee Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -1121,6 +1121,7 @@ XML_LRM_ATTR_OP_DIGEST, }; + gboolean do_delete = FALSE; int lpc = 0; static int meta_len = 0; if(meta_len == 0) { @@ -1144,7 +1145,6 @@ } xml_prop_iter(param_set, prop_name, prop_value, - gboolean do_delete = FALSE; if(strncasecmp(prop_name, CRM_META, meta_len) == 0) { do_delete = TRUE; } _______________________________________________ Linux-ha-cvs mailing list Linux-ha-cvs@lists.linux-ha.org http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
_______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/