aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-06-06 14:13:02 +0200
committerDiego Biurrun <diego@biurrun.de>2012-03-28 09:38:33 +0200
commita92be9b856bd11b081041c43c25d442028fe9a63 (patch)
tree32f852fdf904a30238c789e57510be710eaa7826 /libavutil
parent856c8e0a049dc7069b7504d3aaa48549c75852de (diff)
downloadffmpeg-a92be9b856bd11b081041c43c25d442028fe9a63.tar.gz
Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/imgutils.c4
-rw-r--r--libavutil/parseutils.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 8c8251bddb..3d28e5659b 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -93,12 +93,10 @@ int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt
int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
uint8_t *ptr, const int linesizes[4])
{
- int i, total_size, size[4], has_plane[4];
+ int i, total_size, size[4] = { 0 }, has_plane[4] = { 0 };
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];
memset(data , 0, sizeof(data[0])*4);
- memset(size , 0, sizeof(size));
- memset(has_plane, 0, sizeof(has_plane));
if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL)
return AVERROR(EINVAL);
diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
index a1d221b62a..ed147eef3d 100644
--- a/libavutil/parseutils.c
+++ b/libavutil/parseutils.c
@@ -484,7 +484,7 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
{
const char *p;
int64_t t;
- struct tm dt;
+ struct tm dt = { 0 };
int i;
static const char * const date_fmt[] = {
"%Y-%m-%d",
@@ -509,8 +509,6 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
lastch = '\0';
is_utc = (lastch == 'z' || lastch == 'Z');
- memset(&dt, 0, sizeof(dt));
-
p = timestr;
q = NULL;
if (!duration) {