avfiltergraph: use sizeof(var) instead of sizeof(type)
authorAnton Khirnov <anton@khirnov.net>
Mon, 25 Feb 2013 11:14:56 +0000 (12:14 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sat, 16 Mar 2013 04:34:20 +0000 (05:34 +0100)
libavfilter/avfiltergraph.c

index 7bbfc1c..516617e 100644 (file)
@@ -39,7 +39,7 @@ static const AVClass filtergraph_class = {
 
 AVFilterGraph *avfilter_graph_alloc(void)
 {
-    AVFilterGraph *ret = av_mallocz(sizeof(AVFilterGraph));
+    AVFilterGraph *ret = av_mallocz(sizeof(*ret));
     if (!ret)
         return NULL;
     ret->av_class = &filtergraph_class;
@@ -61,7 +61,7 @@ void avfilter_graph_free(AVFilterGraph **graph)
 int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter)
 {
     AVFilterContext **filters = av_realloc(graph->filters,
-                                           sizeof(AVFilterContext*) * (graph->nb_filters + 1));
+                                           sizeof(*filters) * (graph->nb_filters + 1));
     if (!filters)
         return AVERROR(ENOMEM);