summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-03-10 18:10:38 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-03-10 18:10:38 +0100
commit9097561c8754c5e9f49a8b0f346de081b3c3bd94 (patch)
tree9c5f8b326852820629dc18ae5003a8a747ad3450 /src
parent825830590663c363b32c7b9caae8db5f3a5c913f (diff)
[CHORE] Add DDK testing, AsciiUtils tweaks, proof organization.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src')
-rw-r--r--src/kernel/src/AsciiUtils.cpp9
-rw-r--r--src/libDDK/src/Allocator.cpp10
-rw-r--r--src/libSoundSystem/SoundSystemKit/VirtualMixer.h8
3 files changed, 14 insertions, 13 deletions
diff --git a/src/kernel/src/AsciiUtils.cpp b/src/kernel/src/AsciiUtils.cpp
index 697739a5..c063ef11 100644
--- a/src/kernel/src/AsciiUtils.cpp
+++ b/src/kernel/src/AsciiUtils.cpp
@@ -1,4 +1,4 @@
-// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org)
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/ne-foss-org/nekernel
@@ -27,8 +27,11 @@ Size rt_string_len(const Char* ptr) {
const Char* rt_alloc_string(const Char* src) {
SizeT slen = rt_string_len(src);
Char* buffer = new Char[slen + 1];
+
if (!buffer) return nullptr;
+ rt_set_memory(buffer, 0, slen);
+
if (rt_copy_memory_safe(reinterpret_cast<voidPtr>(const_cast<Char*>(src)),
reinterpret_cast<voidPtr>(buffer), slen, slen + 1) < 0) {
delete[] buffer;
@@ -100,7 +103,9 @@ Int32 rt_to_lower(Int ch) {
}
Int32 rt_is_alnum(Int ch) {
- return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9');
+ return (ch >= 'a' && ch <= 'z') ||
+ (ch >= 'A' && ch <= 'Z') ||
+ (ch >= '0' && ch <= '9');
}
Boolean rt_is_space(Int ch) {
diff --git a/src/libDDK/src/Allocator.cpp b/src/libDDK/src/Allocator.cpp
index b8bc6b4c..1122e310 100644
--- a/src/libDDK/src/Allocator.cpp
+++ b/src/libDDK/src/Allocator.cpp
@@ -1,10 +1,6 @@
-/* ========================================
-
- Copyright Amlal El Mahrouss.
-
- Purpose: DDK allocator.
-
-======================================== */
+// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (see LICENSE file)
+// Official repository: https://github.com/ne-foss-org/nekernel
#include <DriverKit/DriverKit.h>
diff --git a/src/libSoundSystem/SoundSystemKit/VirtualMixer.h b/src/libSoundSystem/SoundSystemKit/VirtualMixer.h
index e57ff29b..b6918f5a 100644
--- a/src/libSoundSystem/SoundSystemKit/VirtualMixer.h
+++ b/src/libSoundSystem/SoundSystemKit/VirtualMixer.h
@@ -9,9 +9,9 @@
#include <libSystem/SystemKit/System.h>
namespace SoundSystem {
- struct VirtualMixer;
- struct VirtualSource;
- struct VirtualVolume;
-}
+struct VirtualMixer;
+struct VirtualSource;
+struct VirtualVolume;
+} // namespace SoundSystem
#endif