From 93245d385de4308d66fec933e01397b83aa4f3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 16 Apr 2024 13:52:23 +0200 Subject: [PATCH] [FREELDR] arcsupp.c: Relicense my code to MIT and use SAL2 annotations. --- boot/freeldr/freeldr/include/arcsupp.h | 30 ++++++++++++++------------ boot/freeldr/freeldr/lib/arcsupp.c | 24 +++++++++++---------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/boot/freeldr/freeldr/include/arcsupp.h b/boot/freeldr/freeldr/include/arcsupp.h index 7208974d4be..fb7b0e424b0 100644 --- a/boot/freeldr/freeldr/include/arcsupp.h +++ b/boot/freeldr/freeldr/include/arcsupp.h @@ -1,8 +1,8 @@ /* * PROJECT: FreeLoader - * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * LICENSE: MIT (https://spdx.org/licenses/MIT) * PURPOSE: Generic ARC Support Functions - * COPYRIGHT: Copyright 2019 Hermes Belusca-Maito + * COPYRIGHT: Copyright 2019-2024 Hermès Bélusca-Maïto */ #pragma once @@ -10,19 +10,21 @@ typedef ARC_STATUS (__cdecl *ARC_ENTRY_POINT)( - IN ULONG Argc, - IN PCHAR Argv[], - IN PCHAR Envp[]); + _In_ ULONG Argc, + _In_ PCHAR Argv[], + _In_ PCHAR Envp[]); -PCHAR +PSTR GetNextArgumentValue( - IN ULONG Argc, - IN PCHAR Argv[], - IN OUT PULONG LastIndex OPTIONAL, - IN PCHAR ArgumentName); + _In_ ULONG Argc, + _In_ PCHAR Argv[], + _Inout_opt_ PULONG LastIndex, + _In_ PCSTR ArgumentName); -PCHAR +PSTR GetArgumentValue( - IN ULONG Argc, - IN PCHAR Argv[], - IN PCHAR ArgumentName); + _In_ ULONG Argc, + _In_ PCHAR Argv[], + _In_ PCSTR ArgumentName); + +/* EOF */ diff --git a/boot/freeldr/freeldr/lib/arcsupp.c b/boot/freeldr/freeldr/lib/arcsupp.c index 1292ece5e22..1e3d7ecf180 100644 --- a/boot/freeldr/freeldr/lib/arcsupp.c +++ b/boot/freeldr/freeldr/lib/arcsupp.c @@ -1,8 +1,8 @@ /* * PROJECT: FreeLoader - * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * LICENSE: MIT (https://spdx.org/licenses/MIT) * PURPOSE: Generic ARC Support Functions - * COPYRIGHT: Copyright 2019 Hermes Belusca-Maito + * COPYRIGHT: Copyright 2019-2024 Hermès Bélusca-Maïto */ /* INCLUDES ******************************************************************/ @@ -11,12 +11,12 @@ /* FUNCTIONS *****************************************************************/ -PCHAR +PSTR GetNextArgumentValue( - IN ULONG Argc, - IN PCHAR Argv[], - IN OUT PULONG LastIndex OPTIONAL, - IN PCHAR ArgumentName) + _In_ ULONG Argc, + _In_ PCHAR Argv[], + _Inout_opt_ PULONG LastIndex, + _In_ PCSTR ArgumentName) { ULONG i; SIZE_T ArgNameLen = strlen(ArgumentName); @@ -37,11 +37,13 @@ GetNextArgumentValue( return NULL; } -PCHAR +PSTR GetArgumentValue( - IN ULONG Argc, - IN PCHAR Argv[], - IN PCHAR ArgumentName) + _In_ ULONG Argc, + _In_ PCHAR Argv[], + _In_ PCSTR ArgumentName) { return GetNextArgumentValue(Argc, Argv, NULL, ArgumentName); } + +/* EOF */