Function Macro

GLibassert_no_errno

Declaration [src]

#define g_assert_no_errno (
  expr
)

Description [src]

Debugging macro to check that an expression has a non-negative return value, as used by traditional POSIX functions (such as rmdir()) to indicate success.

If the assertion fails (i.e. the expr returns a negative value), an error message is logged and the testcase is marked as failed. The error message will contain the value of errno and its human-readable message from g_strerror().

This macro will clear the value of errno before executing expr.

Available since:2.66

Parameters

expr -
 

The expression to check.