---
libavutil/avstring.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 2c88bd3..55b8b7e 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -96,7 +96,7 @@ size_t av_strlcatf(char *dst, size_t size, const char *fmt,
...)
char *av_d2str(double d)
{
- char *str= av_malloc(16);
+ char *str = av_malloc(16);
if(str) snprintf(str, 16, "%f", d);
return str;
}
@@ -105,32 +105,33 @@ char *av_d2str(double d)
char *av_get_token(const char **buf, const char *term)
{
- char *out = av_malloc(strlen(*buf) + 1);
- char *ret= out, *end= out;
+ char *out = av_malloc(strlen(*buf) + 1);
+ char *ret = out, *end = out;
const char *p = *buf;
- if (!out) return NULL;
+ if (!out)
+ return NULL;
p += strspn(p, WHITESPACES);
- while(*p && !strspn(p, term)) {
+ while (*p && !strspn(p, term)) {
char c = *p++;
- if(c == '\\' && *p){
+ if (c == '\\' && *p) {
*out++ = *p++;
- end= out;
- }else if(c == '\''){
- while(*p && *p != '\'')
+ end = out;
+ } else if (c == '\'') {
+ while (*p && *p != '\'')
*out++ = *p++;
- if(*p){
+ if (*p) {
p++;
- end= out;
+ end = out;
}
- }else{
+ } else {
*out++ = c;
}
}
- do{
+ do {
*out-- = 0;
- }while(out >= end && strspn(out, WHITESPACES));
+ } while (out >= end && strspn(out, WHITESPACES));
*buf = p;
--
1.8.0.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel