mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 19:31:14 -03:00
Some changes to migrate towards C++ and a multithreaded model
This commit is contained in:
16
sanity.cpp
16
sanity.cpp
@@ -49,27 +49,27 @@ int sanity_check()
|
||||
kill_sanity_check();
|
||||
if( !insane )
|
||||
proc_sanity_check();
|
||||
|
||||
|
||||
return insane;
|
||||
}
|
||||
|
||||
void validate_pointer( const void *ptr, const wchar_t *err, int null_ok )
|
||||
{
|
||||
|
||||
/*
|
||||
Test if the pointer data crosses a segment boundary.
|
||||
|
||||
/*
|
||||
Test if the pointer data crosses a segment boundary.
|
||||
*/
|
||||
|
||||
|
||||
if( (0x00000003l & (long)ptr) != 0 )
|
||||
{
|
||||
debug( 0, _(L"The pointer '%ls' is invalid"), err );
|
||||
sanity_lose();
|
||||
sanity_lose();
|
||||
}
|
||||
|
||||
|
||||
if((!null_ok) && (ptr==0))
|
||||
{
|
||||
debug( 0, _(L"The pointer '%ls' is null"), err );
|
||||
sanity_lose();
|
||||
sanity_lose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user