Subversion Repositories HelenOS

Rev

Rev 4739 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4739 Rev 4743
Line 59... Line 59...
59
 *  @returns FALSE if the value indicates success (EOK).
59
 *  @returns FALSE if the value indicates success (EOK).
60
 *  @returns TRUE otherwise.
60
 *  @returns TRUE otherwise.
61
 */
61
 */
62
#ifdef CONFIG_DEBUG
62
#ifdef CONFIG_DEBUG
63
 
63
 
64
#define ERROR_OCCURRED( value )     (( ERROR_CODE = ( value )) != EOK )
64
#define ERROR_OCCURRED( value )     ((( ERROR_CODE = ( value )) != EOK ) && ({ printf( "error at %s:%d %d\n", __FILE__, __LINE__, ERROR_CODE ); 1; }))
65
 
65
 
66
#else
66
#else
67
 
67
 
68
#define ERROR_OCCURRED( value )     ((( ERROR_CODE = ( value )) != EOK ) && ({ printf( "error at %s:%d %d\n", __FILE__, __LINE__, ERROR_CODE ); 1; }))
68
#define ERROR_OCCURRED( value )     (( ERROR_CODE = ( value )) != EOK )
69
 
69
 
70
#endif
70
#endif
71
 
71
 
72
/** Checks if an error occurred and immediately exits the actual function returning the error code.
72
/** Checks if an error occurred and immediately exits the actual function returning the error code.
73
 *  @param value The value to be checked. May be a function call. Input parameter.
73
 *  @param value The value to be checked. May be a function call. Input parameter.