----- Original Message ----- > From: "Tommi Virtanen" <tommi.virtanen@xxxxxxxxxxxxx> > To: "Noah Watkins" <jayhawk@xxxxxxxxxxx> > Cc: "ceph-devel" <ceph-devel@xxxxxxxxxxxxxxx> > Sent: Wednesday, November 9, 2011 1:36:28 PM > Subject: Re: [PATCH 1/4] client: return stripe address replicas > On Tue, Nov 8, 2011 at 18:39, Noah Watkins <jayhawk@xxxxxxxxxxx> > wrote: > > + /* naddr == 0: drop through and return actual size */ > > + if (naddr && (address.size() > (unsigned)naddr)) > > I have to say I'm not completely comfortable with the magicness of > naddr==0, mostly because I haven't seen other APIs do it like that. I'm with you, I haven't seen it -- atleast I couldn't find a good example in libc. I guess it's technically a special case as 0 would be too small and the user would expect ERANGE. I'm pretty neutral on this as it's for pretty specialized users. -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html