File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ The C source code under the directory ` src/ ` follows this convention regarding error handling:
2+
3+ Functions that can return a failure to the caller, take the argument
4+ ` libcrun_error_t *err ` and return an int or a pointer.
5+
6+ If the function succeeds, then
7+
8+ - ` 0 ` or a non-NULL pointer is returned.
9+ - ` err ` is not modified.
10+
11+ If the function fails, then
12+
13+ - a negative number or a non-NULL pointer is returned.
14+ - ` err ` is set to the pointer of an allocated ` struct libcrun_error_s ` .
15+ The member ` status ` is set to an errno-style value.
16+ The member ` msg ` is set to an allocated error message string.
17+
18+ The functions expect that the passed in ` err ` is not already pointing to an allocated ` struct libcrun_error_s ` .
You can’t perform that action at this time.
0 commit comments