From: Arnaud Giersch Date: Thu, 9 Feb 2012 15:52:04 +0000 (+0100) Subject: Don't decrement surfxml_buffer_stack_stack_ptr twice in SURFXML_END_TAG. X-Git-Tag: exp_20120216~20 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bf5d490b0215440d200846dfec8d2d125b947897?hp=bacbeb57f1e9eae6aa69a8f2fa5f455d7f4d1dac Don't decrement surfxml_buffer_stack_stack_ptr twice in SURFXML_END_TAG. --- diff --git a/include/surf/surfxml_parse.h b/include/surf/surfxml_parse.h index cc8936de24..c46eb4025b 100644 --- a/include/surf/surfxml_parse.h +++ b/include/surf/surfxml_parse.h @@ -81,17 +81,17 @@ extern unsigned int surfxml_buffer_stack_stack[1024]; AX_ptr = 0; \ memset(surfxml_bufferstack,0,surfxml_bufferstack_size); } while(0) -#define SURFXML_START_TAG(tag) do{ \ - surfxml_buffer_stack_stack[surfxml_buffer_stack_stack_ptr] = AX_ptr;\ - surfxml_buffer_stack_stack_ptr++;\ - STag_surfxml_##tag(); \ - }while(0) +#define SURFXML_START_TAG(tag) \ + do{ \ + surfxml_buffer_stack_stack[surfxml_buffer_stack_stack_ptr++] = AX_ptr; \ + STag_surfxml_##tag(); \ + }while(0) -#define SURFXML_END_TAG(tag) do{ \ - surfxml_buffer_stack_stack_ptr--;\ - AX_ptr = surfxml_buffer_stack_stack[surfxml_buffer_stack_stack_ptr-1];\ - ETag_surfxml_##tag();\ - } while(0) +#define SURFXML_END_TAG(tag) \ + do{ \ + AX_ptr = surfxml_buffer_stack_stack[--surfxml_buffer_stack_stack_ptr]; \ + ETag_surfxml_##tag(); \ + } while(0) XBT_PUBLIC(void) surfxml_add_callback(xbt_dynar_t cb_list, void_f_void_t function);