libbluray | branch: master | hpi1 <[email protected]> | Tue Apr 28 13:06:37 2015 +0300| [451b9fec6268006e9ba4907d6fab3731974ff5a0] | committer: hpi1
Cosmetics > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=451b9fec6268006e9ba4907d6fab3731974ff5a0 --- src/util/strutl.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/util/strutl.c b/src/util/strutl.c index 4e9dc4f..39c772d 100644 --- a/src/util/strutl.c +++ b/src/util/strutl.c @@ -27,22 +27,21 @@ #include <ctype.h> #include <string.h> -char * str_dup(const char *str) +char *str_dup(const char *str) { - return str ? strcpy (malloc(strlen(str) + 1), str) : NULL; + return str ? strcpy (malloc(strlen(str) + 1), str) : NULL; } -char * str_printf(const char *fmt, ...) +char *str_printf(const char *fmt, ...) { /* Guess we need no more than 100 bytes. */ - int len; va_list ap; - int size = 100; - char *tmp, *str = NULL; + int len; + int size = 100; + char *tmp, *str = NULL; str = malloc(size); - while (1) - { + while (1) { /* Try to print in the allocated space. */ va_start(ap, fmt); len = vsnprintf(str, size, fmt, ap); _______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
