Move update_if_necessary to util.c, will be necessary later
This commit is contained in:
@ -41,6 +41,13 @@ extern struct keyvalue_table_head by_child;
|
||||
int min(int a, int b);
|
||||
int max(int a, int b);
|
||||
|
||||
/**
|
||||
* Updates *destination with new_value and returns true if it was changed or false
|
||||
* if it was the same
|
||||
*
|
||||
*/
|
||||
bool update_if_necessary(uint32_t *destination, const uint32_t new_value);
|
||||
|
||||
/**
|
||||
* Safe-wrapper around malloc which exits if malloc returns NULL (meaning that
|
||||
* there is no more memory available)
|
||||
|
Reference in New Issue
Block a user