[FFmpeg-devel] [PATCH 1/4] dict.c: minor simplification.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Wed Jul 30 20:38:05 CEST 2014
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
libavutil/dict.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavutil/dict.c b/libavutil/dict.c
index 358958c..aea8910 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)
--
2.0.1
More information about the ffmpeg-devel
mailing list