status: Add return_need_more() utility function

This commit is contained in:
Tobias Brunner
2022-06-29 10:28:50 +02:00
parent ec350ebb78
commit f00e80d759
3 changed files with 21 additions and 15 deletions
+13 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2014 Tobias Brunner
* Copyright (C) 2008-2018 Tobias Brunner
* Copyright (C) 2005-2008 Martin Willi
*
* Copyright (C) secunet Security Networks AG
@@ -32,18 +32,26 @@ ENUM(status_names, SUCCESS, NEED_MORE,
"NEED_MORE",
);
/**
* returns FAILED
/*
* Described in header
*/
status_t return_failed()
{
return FAILED;
}
/**
* returns SUCCESS
/*
* Described in header
*/
status_t return_success()
{
return SUCCESS;
}
/*
* Described in header
*/
status_t return_need_more()
{
return NEED_MORE;
}
+6 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2014 Tobias Brunner
* Copyright (C) 2008-2018 Tobias Brunner
* Copyright (C) 2008 Martin Willi
*
* Copyright (C) secunet Security Networks AG
@@ -70,4 +70,9 @@ status_t return_failed();
*/
status_t return_success();
/**
* returns NEED_MORE
*/
status_t return_need_more();
#endif /** STATUS_H_ @} */