Files
aaruremote/list_devices.c

55 lines
1.2 KiB
C
Raw Permalink Normal View History

2019-10-12 23:53:29 +01:00
/*
2020-03-01 05:44:49 +00:00
* This file is part of the Aaru Remote Server.
2024-12-19 15:34:27 +00:00
* Copyright (c) 2019-2025 Natalia Portillo.
2019-10-12 23:53:29 +01:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2019-10-13 14:11:54 +01:00
#include <stdlib.h>
2020-10-24 04:23:01 +01:00
#ifdef _WIN32
#include <windows.h>
#include "win32/win32.h"
#else
#include <stdint.h>
#endif
#include "aaruremote.h"
2019-10-13 14:11:54 +01:00
void FreeDeviceInfoList(DeviceInfoList* start)
{
DeviceInfoList* current;
while(start)
{
current = start;
start = current->next;
free(current);
}
2019-10-13 15:11:45 +01:00
}
uint16_t DeviceInfoListCount(DeviceInfoList* start)
{
uint16_t count = 0;
DeviceInfoList* current;
while(start)
{
current = start;
start = current->next;
count++;
}
return count;
2019-10-12 23:53:29 +01:00
}