diff options
author | Alexander Kuleshov <kuleshovmail@gmail.com> | 2016-02-16 23:51:43 +0600 |
---|---|---|
committer | Alexander Kuleshov <kuleshovmail@gmail.com> | 2016-02-19 01:36:46 +0600 |
commit | dbacacaaeac47f792fb33ead7f8946689219ef2c (patch) | |
tree | 90f2fd58c31884de1bbf25fb88d5d08b68afdafa /src/basic/unit-name.c | |
parent | 2c45295e47642812ea417efba7f2f3339c6e2912 (diff) |
alloc-util: cleanups
This patch contains a set of little cleanups for alloc-util.h:
1. The malloc_multiply(), realloc_multiply() and memdup_multiply()
functions check allocation related parameters on overflow. Let's
move them to the separate size_multiply_overflow() function for
simplicity, code duplication prevention and possible reuse in future.
2. use SIZE_MAX from stdlib instead of ((size_t) - 1) to be more
clear.
3. The 'a'/'b' variables are renamed to 'size' and 'need' to be
more clear.'
Diffstat (limited to 'src/basic/unit-name.c')
0 files changed, 0 insertions, 0 deletions