Re: [FFmpeg-devel] [PATCH 20/20] avformat/matroskaenc: Cosmetics

2020-04-06 Thread Moritz Barsnick
On Mon, Apr 06, 2020 at 11:05:50 +0200, Andreas Rheinhardt wrote: > > Isn't the extra set of brackets there to tell the compiler that the > > assignment is on purpose? > The assignment is already on purpose without these extra brackets. > (What compiler thinks it is not on purpose? By "thinks" you

Re: [FFmpeg-devel] [PATCH 20/20] avformat/matroskaenc: Cosmetics

2020-04-06 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2020-04-06 11:05:50) > Moritz Barsnick: > > On Sun, Apr 05, 2020 at 17:59:28 +0200, Andreas Rheinhardt wrote: > >> -if ((t = av_dict_get(c->metadata, "title", NULL, 0))) { > >> +if (t = av_dict_get(c->metadata, "title", NULL, 0)) { > > > > Isn't the extr

Re: [FFmpeg-devel] [PATCH 20/20] avformat/matroskaenc: Cosmetics

2020-04-06 Thread Andreas Rheinhardt
Moritz Barsnick: > On Sun, Apr 05, 2020 at 17:59:28 +0200, Andreas Rheinhardt wrote: >> -if ((t = av_dict_get(c->metadata, "title", NULL, 0))) { >> +if (t = av_dict_get(c->metadata, "title", NULL, 0)) { > > Isn't the extra set of brackets there to tell the compiler that the > assig

Re: [FFmpeg-devel] [PATCH 20/20] avformat/matroskaenc: Cosmetics

2020-04-06 Thread Moritz Barsnick
On Sun, Apr 05, 2020 at 17:59:28 +0200, Andreas Rheinhardt wrote: > -if ((t = av_dict_get(c->metadata, "title", NULL, 0))) { > +if (t = av_dict_get(c->metadata, "title", NULL, 0)) { Isn't the extra set of brackets there to tell the compiler that the assignment is on purpose? Morit

[FFmpeg-devel] [PATCH 20/20] avformat/matroskaenc: Cosmetics

2020-04-05 Thread Andreas Rheinhardt
Reindentation, removal of { } if they contain only one statement, removal of other useless parentheses and moving the return statement to a line of its own in situations like "if (ret < 0) return ret;". Moreover, several overlong lines were made shorter and a camelCase variable received a name in l