aboutsummaryrefslogtreecommitdiffhomepage
path: root/sanity.cpp
diff options
context:
space:
mode:
authorGravatar Łukasz Niemier <lukasz@niemier.pl>2012-11-18 11:23:22 +0100
committerGravatar Łukasz Niemier <lukasz@niemier.pl>2012-11-18 11:23:22 +0100
commit47df1ae40adecd0a02fc7dd06ab0745cb18c3fe0 (patch)
tree13bf3e8fdcae60fdfb5fa5e26c95818dc7a49790 /sanity.cpp
parentb79854ad1aa814d9d35d76a1929b4726fa4bffa5 (diff)
Remove trailing whitespaces and change tabs to spaces
Diffstat (limited to 'sanity.cpp')
-rw-r--r--sanity.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/sanity.cpp b/sanity.cpp
index 37e7e7e9..cbce3c82 100644
--- a/sanity.cpp
+++ b/sanity.cpp
@@ -1,5 +1,5 @@
/** \file sanity.c
- Functions for performing sanity checks on the program state
+ Functions for performing sanity checks on the program state
*/
#include "config.h"
@@ -34,43 +34,43 @@ static int insane;
void sanity_lose()
{
- debug( 0, _(L"Errors detected, shutting down. Break on sanity_lose() to debug.") );
- insane = 1;
+ debug( 0, _(L"Errors detected, shutting down. Break on sanity_lose() to debug.") );
+ insane = 1;
}
int sanity_check()
{
- if( !insane )
- if( get_is_interactive() )
- history_sanity_check();
- if( !insane )
- reader_sanity_check();
- if( !insane )
- kill_sanity_check();
- if( !insane )
- proc_sanity_check();
-
- return insane;
+ if( !insane )
+ if( get_is_interactive() )
+ history_sanity_check();
+ if( !insane )
+ reader_sanity_check();
+ if( !insane )
+ 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.
- */
-
- if( (0x00000003l & (intptr_t)ptr) != 0 )
- {
- debug( 0, _(L"The pointer '%ls' is invalid"), err );
- sanity_lose();
- }
-
- if((!null_ok) && (ptr==0))
- {
- debug( 0, _(L"The pointer '%ls' is null"), err );
- sanity_lose();
- }
+
+ /*
+ Test if the pointer data crosses a segment boundary.
+ */
+
+ if( (0x00000003l & (intptr_t)ptr) != 0 )
+ {
+ debug( 0, _(L"The pointer '%ls' is invalid"), err );
+ sanity_lose();
+ }
+
+ if((!null_ok) && (ptr==0))
+ {
+ debug( 0, _(L"The pointer '%ls' is null"), err );
+ sanity_lose();
+ }
}