On May 6, 2014 1:34:01 AM CEST, Matthew Dempsky wrote:
>On Mon, May 5, 2014 at 3:56 PM, Alexander Hall
>wrote:
>> I believe a similar situation could appear with not explicitly
>initialized
>> global or static declarations, e.g. in
>> sbin/fsirand/fsirand.c:
>>
>> fsirand(char *device)
>> {
>>
Matthew Dempsky writes:
> On Mon, May 5, 2014 at 3:56 PM, Alexander Hall wrote:
>> I believe a similar situation could appear with not explicitly initialized
>> global or static declarations, e.g. in
>> sbin/fsirand/fsirand.c:
>>
>> fsirand(char *device)
>> {
>> ...
>> static cha
On Mon, May 5, 2014 at 3:56 PM, Alexander Hall wrote:
> I believe a similar situation could appear with not explicitly initialized
> global or static declarations, e.g. in
> sbin/fsirand/fsirand.c:
>
> fsirand(char *device)
> {
> ...
> static char *inodebuf;
This is safe too: C re
On 05/06/14 00:10, Matthew Dempsky wrote:
On Sun, May 4, 2014 at 8:26 PM, Jean-Philippe Ouellet
wrote:
On Sun, May 04, 2014 at 11:30:40PM +0200, Alexander Hall wrote:
NULL theoretically could be != 0
Umm... short of something like:
#undef NULL
#define NULL "I'm silly and want to br
On Sun, May 4, 2014 at 8:26 PM, Jean-Philippe Ouellet
wrote:
> On Sun, May 04, 2014 at 11:30:40PM +0200, Alexander Hall wrote:
>> NULL theoretically could be != 0
>
> Umm... short of something like:
> #undef NULL
> #define NULL "I'm silly and want to break everything"
> or something, I don
On Mon, May 05, 2014 at 07:31:34PM +1000, Joel Sing wrote:
> > This one is calloc, not reallocarray, so unless I'm seriously missing
> > something obvious here, it is indeed zero'd, no?
>
> Run the following before and after your change:
Ah, yep. Can't believe I missed that (along with all the ot
On Mon, 5 May 2014, Jean-Philippe Ouellet wrote:
> On Mon, May 05, 2014 at 11:12:00AM +1000, Joel Sing wrote:
> > > - i = 0;
> > > if (arg->count == 0) {
> > > arg->count = 20;
> > > - arg->data = (char **)malloc(sizeof(char *) * arg->count);
> > > + arg->data
On Sun, May 04, 2014 at 03:50:06PM -0400, Jean-Philippe Ouellet wrote:
> On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote:
> > We are going to completely ignore diffs which change multiple idioms
> > at once.
>
> Okay.
>
> > That is how mistakes get made.
>
> Yep, more true than I r
On Mon, May 05, 2014 at 11:12:00AM +1000, Joel Sing wrote:
> > - i = 0;
> > if (arg->count == 0) {
> > arg->count = 20;
> > - arg->data = (char **)malloc(sizeof(char *) * arg->count);
> > + arg->data = calloc(arg->count, sizeof(char *));
> > }
> > - for (
On Sun, May 04, 2014 at 11:30:40PM +0200, Alexander Hall wrote:
> NULL theoretically could be != 0
Umm... short of something like:
#undef NULL
#define NULL "I'm silly and want to break everything"
or something, I don't see when that'd be the case.
According to ISO/IEC 9899:1999 TC3 (n1256
On Mon, 5 May 2014, Jean-Philippe Ouellet wrote:
> On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote:
> > We are going to completely ignore diffs which change multiple idioms
> > at once.
>
> Okay.
>
> > That is how mistakes get made.
>
> Yep, more true than I realized.
FWIW I already
On Sun, May 4, 2014 at 5:00 PM, Alexander Hall wrote:
> On 05/04/14 21:50, Jean-Philippe Ouellet wrote:
>>
>> On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote:
>>>
>>> We are going to completely ignore diffs which change multiple idioms
>>> at once.
>>
>>
>> Okay.
>>
>>> That is how m
On 05/04/14 21:50, Jean-Philippe Ouellet wrote:
On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote:
We are going to completely ignore diffs which change multiple idioms
at once.
Okay.
That is how mistakes get made.
Yep, more true than I realized.
Here's a simpler one:
Index:
On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote:
> We are going to completely ignore diffs which change multiple idioms
> at once.
Okay.
> That is how mistakes get made.
Yep, more true than I realized.
Here's a simpler one:
Index: apps.c
=
We are going to completely ignore diffs which change multiple idioms
at once.
That is how mistakes get made.
> On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote:
> > Hello,
> >
> > I've gone through lib/libssl/src/apps with the goal of making {m,c,re}alloc
> > uses more idiom
On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote:
> Hello,
>
> I've gone through lib/libssl/src/apps with the goal of making {m,c,re}alloc
> uses more idiomatic, adding error checking in some places where missing,
> and some minor style unification.
>
> Feedback appreciated,
On Sun, May 04, 2014 at 01:26:18AM -0700, Philip Guenther wrote:
> On Sunday, May 4, 2014, patrick keshishian wrote:
>
> > On Sun, May 04, 2014 at 12:29:59AM -0700, Philip Guenther wrote:
> > > On Sun, May 4, 2014 at 12:21 AM, patrick keshishian
> > >
> > >wrote:
> > >
> > > > On Sun, May 04, 2
On Sunday, May 4, 2014, Marc Espie wrote:
> See guenther(2) for a more serious answer).
>
Thank you, but I've always thought of myself as belonging in section 6...
Philip Guenther
On Sunday, May 4, 2014, patrick keshishian wrote:
> On Sun, May 04, 2014 at 12:29:59AM -0700, Philip Guenther wrote:
> > On Sun, May 4, 2014 at 12:21 AM, patrick keshishian
> >
> >wrote:
> >
> > > On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote:
> > >
> > ...
> >
> > > > -
On Sun, May 04, 2014 at 12:21:04AM -0700, patrick keshishian wrote:
> why not use calloc(2)?
Because it doesn't exist ?
(hint: the 2 in calloc(2) is the manual section. There is no calloc system
call, therefore you can't be right. See guenther(2) for a more serious answer).
On Sun, May 04, 2014 at 12:29:59AM -0700, Philip Guenther wrote:
> On Sun, May 4, 2014 at 12:21 AM, patrick keshishian
> wrote:
>
> > On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote:
> >
> ...
>
> > > - if ((irow = (char **)malloc(sizeof(char *) *
> > > -
On Sun, May 4, 2014 at 12:21 AM, patrick keshishian wrote:
> On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote:
>
...
> > - if ((irow = (char **)malloc(sizeof(char *) *
> > - (DB_NUMBER + 1))) == NULL) {
> > + irow = reallocarray(NULL, D
On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote:
> Hello,
>
> I've gone through lib/libssl/src/apps with the goal of making {m,c,re}alloc
> uses more idiomatic, adding error checking in some places where missing,
> and some minor style unification.
>
> Feedback appreciated,
Hello,
I've gone through lib/libssl/src/apps with the goal of making {m,c,re}alloc
uses more idiomatic, adding error checking in some places where missing,
and some minor style unification.
Feedback appreciated, better patches to come after the semester ends.
Index: apps.c
=
24 matches
Mail list logo