[FFmpeg-devel] [PATCH] Zero-initialize the reply struct in ff_rtsp_connect

Måns Rullgård mans
Sun Apr 4 23:11:07 CEST 2010

Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> On Sat, Apr 03, 2010 at 09:16:32PM -0400, Ronald S. Bultje wrote:
>> Hi,
>> On Sat, Apr 3, 2010 at 8:24 AM, Martin Storsj? <martin at martin.st> wrote:
>> > This is a simple solution to the problem explained here:
>> > http://tranquillity.ath.cx/clang/2010-04-02-1/report-4tXxXX.html#EndPath
>> > Are you Ronald ok with this one, or should we just zero out status_code?
>> I wonder if RTSPMessageHeader reply = { 0 }; has the same effect as
>> memset(&reply, 0, ..);? That saves two lines.

Even reply = {} will work.

> With older gccs it resulted in a good bit slower code at least.

How old?  What about more recent ones?

> And depending on what is in the struct it might not be valid syntax.

An empty pair of braces will always work.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list