Re: git am with MIME | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Alex Riesen <raa.lkml <at> gmail.com> writes: > > Jeff King, Tue, Aug 19, 2008 19:07:31 +0200: > > On Tue, Aug 19, 2008 at 05:50:14PM +0200, Lea Wiemann wrote: > > @@ -107,7 +107,7 @@ static void handle_from(const struct strbuf *from) > > el = strcspn(at, " \n\t\r\v\f>"); > > strbuf_reset(&email); > > strbuf_add(&email, at, el); > > - strbuf_remove(&f, at - f.buf, el + 1); > > + strbuf_remove(&f, at - f.buf, el + (at[el] ? 1 : 0)); > > > > + strbuf_remove(&f, at - f.buf, el + !!at[el]); > > (Some people'll kill me for that :) And why shouldn't they when: strbuf_remove(&f, at - f.buf, el + (at[el] != 0)); is infinitely better in every possible way? ;) -- 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
[Newbies FAQ] [Kernel List] [Site Home] [Free Online Dating] [Gcc Help] [IETF Annouce] [DCCP] [Netdev] [Networking] [Security] [V4L] [Bugtraq] [Free Online Dating] [Rubini] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Linux SCSI] [DDR & Rambus] [Linux Resources]