diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-07-29 21:23:14 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-07-31 20:10:29 +0200 |
commit | f0de01856fde4a104254569f9d5c80a80cac49cc (patch) | |
tree | 40113d9878e3fec44aafca343183612e7a87c273 /libavutil/dict.c | |
parent | fcb11ec291e9b3e3f352fa4d3e9026c0f7f64aa8 (diff) | |
download | ffmpeg-f0de01856fde4a104254569f9d5c80a80cac49cc.tar.gz |
dict.c: minor simplification.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavutil/dict.c')
-rw-r--r-- | libavutil/dict.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavutil/dict.c b/libavutil/dict.c index 358958cdc5..aea8910541 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -90,10 +90,9 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, } else { AVDictionaryEntry *tmp = av_realloc(m->elems, (m->count + 1) * sizeof(*m->elems)); - if (tmp) - m->elems = tmp; - else + if (!tmp) return AVERROR(ENOMEM); + m->elems = tmp; } if (value) { if (flags & AV_DICT_DONT_STRDUP_KEY) |