public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Krzysztofowicz <ankry@pg.gda.pl>
To: hps@intermeta.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net #9
Date: Wed, 30 May 2001 12:28:04 +0200 (MET DST)	[thread overview]
Message-ID: <200105301028.MAA23790@sunrise.pg.gda.pl> (raw)
In-Reply-To: <9f2enn$jbr$1@forge.intermeta.de> from "Henning P. Schmiedehausen" at May 30, 2001 09:32:39 AM

"Henning P. Schmiedehausen wrote:"
> Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> writes:
> 
> >-static char	name[4][IFNAMSIZ] = { "", "", "", "" };
> 
> >+static char	name[4][IFNAMSIZ];
> 
> Ugh. Sure about that one? the variables have been pointers to zero,
> now they're zero...

I do not agree. As I understand C "name" is a table, i.e. a pointer to a
prealocated area of size of 4*IFNAMSIZ*sizeof(char) bytes. There is no
pointers to the strings stored seprately. 
[ The strings are copied into the apropriate locations in the array during
  initialization ]

After applying the mentioned patch just the whole area of the array will be
zeroed. Not only the first characters of name[i] i=0,1,2,3 ...

Andrzej
-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk


  reply	other threads:[~2001-05-30 10:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-30  0:48 [PATCH] net #9 Andrzej Krzysztofowicz
2001-05-30  1:04 ` Jean Tourrilhes
2001-05-30  1:13   ` Jeff Garzik
2001-05-30  1:25     ` Jean Tourrilhes
2001-05-30  1:47       ` Jeff Garzik
2001-05-30  2:01         ` Jean Tourrilhes
2001-05-30  2:13           ` Jeff Garzik
2001-05-30  2:25             ` Jean Tourrilhes
2001-05-30 16:35           ` Hermann Himmelbauer
2001-05-30  2:13         ` Jean Tourrilhes
2001-05-30  2:17           ` Jeff Garzik
2001-05-30  9:33         ` Henning P. Schmiedehausen
2001-05-30 22:28       ` Pavel Machek
2001-05-30  9:32 ` Henning P. Schmiedehausen
2001-05-30 10:28   ` Andrzej Krzysztofowicz [this message]
2001-05-30 10:30   ` Keith Owens
2001-05-30 10:43     ` Henning P. Schmiedehausen
2001-05-30 10:30   ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200105301028.MAA23790@sunrise.pg.gda.pl \
    --to=ankry@pg.gda.pl \
    --cc=ankry@green.mif.pg.gda.pl \
    --cc=hps@intermeta.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox