/*
- * Copyright (C) 2019 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
+ * Copyright (C) 2019 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License, version 2.1 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: LGPL-2.1-only
*
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <assert.h>
void lttng_tracker_ids_destroy(struct lttng_tracker_ids *ids)
{
+ int i;
+
if (!ids) {
return;
}
- for (int i = 0; i < ids->count; i++) {
+ for (i = 0; i < ids->count; i++) {
lttng_tracker_id_reset(&ids->id_array[i]);
}
free(ids->id_array);
unsigned int count;
enum lttng_tracker_id_status status;
const struct lttng_tracker_id *id;
+ unsigned int i;
status = lttng_tracker_ids_get_count(ids, &count);
if (status != LTTNG_TRACKER_ID_STATUS_OK) {
goto error;
}
- for (unsigned int i = 0; i < count; i++) {
+ for (i = 0; i < count; i++) {
struct lttcomm_tracker_id_header id_hdr;
size_t var_data_len = 0;