From: Mathieu Desnoyers Date: Wed, 1 Jun 2011 20:15:45 +0000 (-0400) Subject: Split vsnprintf with large number of args in two X-Git-Tag: v2.0-pre1~70 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=27d2368e5c6430d26f046373f0ce81da29aac1b2;p=lttng-modules.git Split vsnprintf with large number of args in two Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-events.c b/ltt-events.c index 2693dc2c..1b53d2c1 100644 --- a/ltt-events.c +++ b/ltt-events.c @@ -470,7 +470,6 @@ int _ltt_field_statedump(struct ltt_session *session, length_type = &field->type.u.sequence.length_type; ret = lttng_metadata_printf(session, " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } __%s_length;\n", - " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } %s[ __%s_length ];\n", length_type->u.basic.integer.size, (unsigned int) length_type->u.basic.integer.alignment, length_type->u.basic.integer.signedness, @@ -485,7 +484,12 @@ int _ltt_field_statedump(struct ltt_session *session, #else length_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "", #endif - field->name, + field->name); + if (ret) + return ret; + + ret = lttng_metadata_printf(session, + " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } %s[ __%s_length ];\n", elem_type->u.basic.integer.size, (unsigned int) elem_type->u.basic.integer.alignment, elem_type->u.basic.integer.signedness, @@ -501,8 +505,7 @@ int _ltt_field_statedump(struct ltt_session *session, elem_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "", #endif field->name, - field->name - ); + field->name); break; }