Re: [PATCH v2 0/8] object_id part 4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 20, 2016 at 09:01:30AM +0200, Johannes Schindelin wrote:

> On Sun, 19 Jun 2016, Jeff King wrote:
> 
> > I think traditionally we've avoided struct assignment because some
> > ancient compilers didn't do it. But it's in C89, and I suspect it's
> > crept into the code base anyway over the years without anyone
> > complaining.
> 
> I fear that's my fault, at least partially, seeing as merge-recursive.c
> even *returns* structs (see 6d297f81; I plan to fix that as part of the
> cleaned-up am-3-merge-recursive-direct patch series).

Heh, that commit is quite old. If nobody has complained about it, then I
think there is nothing to be sorry about. If struct assignment (and
returns) work everywhere, and they make the code easier to read, we
should be using them.

I am on the fence regarding oidcpy/oidclr. I agree they _could_ be
struct assignments, but it is also convenient to have concept wrapped up
in a function, in case we ever want to do anything more complicated.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]