libstring_helpers.c:string_get_size(): return void

string_get_size() was documented to return an error, but in fact always
returned 0.  Since the output always fits in 9 bytes, just document that
and let callers do what they do now: pass a small stack buffer and ignore
the return value.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Rasmus Villemoes 2015-02-12 15:01:50 -08:00 committed by Linus Torvalds
parent 84b9fbedf5
commit d1214c65c0
2 changed files with 6 additions and 8 deletions

View file

@ -10,8 +10,8 @@ enum string_size_units {
STRING_UNITS_2, /* use binary powers of 2^10 */
};
int string_get_size(u64 size, enum string_size_units units,
char *buf, int len);
void string_get_size(u64 size, enum string_size_units units,
char *buf, int len);
#define UNESCAPE_SPACE 0x01
#define UNESCAPE_OCTAL 0x02