Hi All,<div>Iam new to this fedora world.. a small question on the below discussion:</div><div><br></div><div>It is mentioned that having, zero in the third argument is <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">legitimate use cases. Can somebody direct me to such a use case, as i feel, giving memset a zero, is asking it, not to do anything [ might have side effects, not sure from my end, though ].</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Regards</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Roopesh M.</span></font></div>
<div><br><div class="gmail_quote">On Thu, Nov 26, 2009 at 2:24 PM, Caolán McNamara <span dir="ltr"><<a href="mailto:caolanm@redhat.com">caolanm@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, 2009-11-25 at 23:39 -0500, Tom Lane wrote:<br>
> John Reiser <<a href="mailto:jreiser@bitwagon.com">jreiser@bitwagon.com</a>> writes:<br>
> > On 11/25/2009 02:03 PM, Dave Jones wrote:<br>
> >> A zero sized memset is always a bug.<br>
><br>
> > No, memset(,,0) is not always a bug.<br>
><br>
> I think it's reasonably safe to assume that a *literal constant* zero in<br>
> the third argument is a bug.  Whether the header macros can distinguish<br>
> that from compile-time-constant expressions is an interesting question,<br>
> but if they can, +1 for throwing an error.<br>
<br>
</div>I logged some time ago a trivial patch of<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=532492" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=532492</a> which is apparently<br>
in rawhide now to generally avoid a warning on memset(foo, 0, 0)<br>
<font color="#888888"><br>
C.<br>
</font><div><div></div><div class="h5"><br>
--<br>
fedora-devel-list mailing list<br>
<a href="mailto:fedora-devel-list@redhat.com">fedora-devel-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/fedora-devel-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-devel-list</a><br>
</div></div></blockquote></div><br></div>