Messages in this thread Patch in this message | | | From | Borislav Petkov <> | Subject | [PATCH] overflow.h: Rename __ab_c_size() to __calc_size() | Date | Fri, 5 Apr 2019 06:57:11 +0200 |
| |
From: Borislav Petkov <bp@suse.de>
... to make its name readable to humans so that it can denote what that helper does.
No functional changes.
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Kees Cook <keescook@chromium.org> Cc: Matthew Wilcox <willy@infradead.org> --- include/linux/overflow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 40b48e2133cb..a9cb77d54df0 100644 --- a/include/linux/overflow.h +++ b/include/linux/overflow.h @@ -278,7 +278,7 @@ static inline __must_check size_t array3_size(size_t a, size_t b, size_t c) return bytes; } -static inline __must_check size_t __ab_c_size(size_t n, size_t size, size_t c) +static inline __must_check size_t __calc_size(size_t n, size_t size, size_t c) { size_t bytes; @@ -302,7 +302,7 @@ static inline __must_check size_t __ab_c_size(size_t n, size_t size, size_t c) * Return: number of bytes needed or SIZE_MAX on overflow. */ #define struct_size(p, member, n) \ - __ab_c_size(n, \ + __calc_size(n, \ sizeof(*(p)->member) + __must_be_array((p)->member),\ sizeof(*(p))) -- 2.21.0
| |