Skip to content
Snippets Groups Projects
Commit c1bfc720 authored by Simon McVittie's avatar Simon McVittie
Browse files

utils: Add doc-comments for xadd, xmul

parent ff33964f
No related branches found
No related tags found
1 merge request!729Optionally emit priority level markers on bubblewrap messages
......@@ -952,6 +952,10 @@ mount_strerror (int errsv)
}
}
/*
* Return a + b if it would not overflow.
* Die with an "out of memory" error if it would.
*/
static size_t
xadd (size_t a, size_t b)
{
......@@ -961,6 +965,10 @@ xadd (size_t a, size_t b)
return result;
}
/*
* Return a * b if it would not overflow.
* Die with an "out of memory" error if it would.
*/
static size_t
xmul (size_t a, size_t b)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment