From: Jeff King Date: Thu, 23 Jun 2011 17:30:13 GMT Subject: Re: [PATCHv2 3/9] archive: refactor list of archive formats Message-ID: <20110623173013.GA7364@sigill.intra.peff.net> In-Reply-To: On Thu, Jun 23, 2011 at 02:05:35PM -0300, Thiago Farina wrote: > > +static struct archiver tar_archiver = { > > +       "tar", > > +       write_tar_archive, > > +       0 > A named constant instead of 0, like you did with > ARCHIVER_WANT_COMPRESSION_LEVELS, would be better? 0 here means the > archiver does not want compression? It's actually a bit-wise flag, so it is not "no compression", but "no flags". So "0" is fairly idiomatic. Given that it's a static initializer that will default to 0, probably a more readable version would be: static struct archiver tar_archiver = { "tar", write_tar_archive }; -Peff