aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/dict.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2014-07-29 21:23:14 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2014-07-31 20:10:29 +0200
commitf0de01856fde4a104254569f9d5c80a80cac49cc (patch)
tree40113d9878e3fec44aafca343183612e7a87c273 /libavutil/dict.c
parentfcb11ec291e9b3e3f352fa4d3e9026c0f7f64aa8 (diff)
downloadffmpeg-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.c5
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)