From 2462d860630674d10d554f86aa669163f6f2db6b Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 3 Feb 2014 16:22:18 +0800 Subject: [PATCH] Kernel/VFS - Add assertion that node for VFS_Mark* is non-null --- KernelLand/Kernel/vfs/select.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/KernelLand/Kernel/vfs/select.c b/KernelLand/Kernel/vfs/select.c index e2be46af..660bca89 100644 --- a/KernelLand/Kernel/vfs/select.c +++ b/KernelLand/Kernel/vfs/select.c @@ -196,6 +196,7 @@ int VFS_Select(int MaxHandle, fd_set *ReadHandles, fd_set *WriteHandles, fd_set // Mark a node as having data ready for reading int VFS_MarkAvaliable(tVFS_Node *Node, BOOL IsDataAvaliable) { + ASSERTR(Node, 1); ENTER("pNode bIsDataAvaliable", Node, IsDataAvaliable); Node->DataAvaliable = !!IsDataAvaliable; if( Node->DataAvaliable ) @@ -207,6 +208,7 @@ int VFS_MarkAvaliable(tVFS_Node *Node, BOOL IsDataAvaliable) // Mark a node as having a full buffer int VFS_MarkFull(tVFS_Node *Node, BOOL IsBufferFull) { + ASSERTR(Node, 1); ENTER("pNode bIsBufferFull", Node, IsBufferFull); Node->BufferFull = !!IsBufferFull; if( !Node->BufferFull ) @@ -218,6 +220,7 @@ int VFS_MarkFull(tVFS_Node *Node, BOOL IsBufferFull) // Mark a node as errored int VFS_MarkError(tVFS_Node *Node, BOOL IsErrorState) { + ASSERTR(Node, 1); ENTER("pNode bIsErrorState", Node, IsErrorState); Node->ErrorOccurred = !!IsErrorState; if( Node->ErrorOccurred ) -- 2.20.1