diff options
author | Mans Rullgard <mans@mansr.com> | 2012-10-11 17:15:10 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-10-11 21:00:27 +0400 |
commit | 68e360a83c5b9dc21fd20cb477b171beab598ee7 (patch) | |
tree | 2697ce3254103edf657083de9e1da0835e6c8937 /libavutil | |
parent | 15ba7f6525c0f56f0c8e3e3e0c0c5129de054f41 (diff) |
parseutils-test: various cleanups
- make tables static const
- remove useless use of compound literal
- break long lines
- fix a comma/semicolon typo
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/parseutils.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c index 23fa80c01b..28aa9c9521 100644 --- a/libavutil/parseutils.c +++ b/libavutil/parseutils.c @@ -650,7 +650,7 @@ int main(void) printf("Testing av_parse_video_rate()\n"); { int i; - const char *rates[] = { + static const char *const rates[] = { "-inf", "inf", "nan", @@ -680,8 +680,8 @@ int main(void) for (i = 0; i < FF_ARRAY_ELEMS(rates); i++) { int ret; - AVRational q = (AVRational){0, 0}; - ret = av_parse_video_rate(&q, rates[i]), + AVRational q = { 0, 0 }; + ret = av_parse_video_rate(&q, rates[i]); printf("'%s' -> %d/%d %s\n", rates[i], q.num, q.den, ret ? "ERROR" : "OK"); } @@ -691,7 +691,7 @@ int main(void) { int i; uint8_t rgba[4]; - const char *color_names[] = { + static const char *const color_names[] = { "foo", "red", "Red ", @@ -732,7 +732,8 @@ int main(void) for (i = 0; i < FF_ARRAY_ELEMS(color_names); i++) { if (av_parse_color(rgba, color_names[i], -1, NULL) >= 0) - printf("%s -> R(%d) G(%d) B(%d) A(%d)\n", color_names[i], rgba[0], rgba[1], rgba[2], rgba[3]); + printf("%s -> R(%d) G(%d) B(%d) A(%d)\n", + color_names[i], rgba[0], rgba[1], rgba[2], rgba[3]); } } |