X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-metadata.c;h=e20f43f667580ebbc3cffab87338ea31944f5dbf;hb=ac41e67e39946acd97752ce52b964976890c5e87;hp=7c6cbc63d8370e29d7caf3ac7a2363c385c657b6;hpb=8de8806159d9d2544e2bc3091cc3c98abe4d97ad;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-metadata.c b/src/bin/lttng-sessiond/ust-metadata.c index 7c6cbc63d..e20f43f66 100644 --- a/src/bin/lttng-sessiond/ust-metadata.c +++ b/src/bin/lttng-sessiond/ust-metadata.c @@ -1,22 +1,8 @@ /* - * ust-metadata.c - * - * LTTng-UST metadata generation - * * Copyright (C) 2010-2013 Mathieu Desnoyers * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * SPDX-License-Identifier: GPL-2.0-only * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #define _LGPL_SOURCE @@ -85,8 +71,10 @@ int get_count_order(unsigned int count) int order; order = fls(count) - 1; - if (count & (count - 1)) + if (count & (count - 1)) { order++; + } + assert(order >= 0); return order; } @@ -220,7 +208,7 @@ void sanitize_ctf_identifier(char *out, const char *in) static int print_escaped_ctf_string(struct ust_registry_session *session, const char *string) { - int ret; + int ret = 0; size_t i; char cur; @@ -1006,8 +994,8 @@ int ust_metadata_session_statedump(struct ust_registry_session *session, uint32_t major, uint32_t minor) { - char uuid_s[UUID_STR_LEN], - clock_uuid_s[UUID_STR_LEN]; + char uuid_s[LTTNG_UUID_STR_LEN], + clock_uuid_s[LTTNG_UUID_STR_LEN]; int ret = 0; assert(session);