netdev
[Top] [All Lists]

Re: [PATCH] reduce stack usage for arlan

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: Re: [PATCH] reduce stack usage for arlan
From: Jörn Engel <joern@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 May 2005 14:20:43 +0200
Cc: netdev@xxxxxxxxxxx
In-reply-to: <428811FB.1050308@xxxxxxxxx>
References: <20050308153457.GB8703@xxxxxxxxxxxxxxxxxxxx> <428811FB.1050308@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Sun, 15 May 2005 23:22:35 -0400, Jeff Garzik wrote:
> Jörn Engel wrote:
> >Jean Tourrilhes indicated that this driver is currently unmaintained.
> >Jeff, do you want this patch?
> 
> > #define SARLSTR(var,nn) {\
> >-    char tmpStr[400];\
> >+    char tmpStr[50];\
> >     int  tmpLn = nn;\
> >-    if (nn > 399 ) tmpLn = 399; \
> >+    BUG_ON(tmpLn > 49);\
> 
> I'm uncomfortable with arbitrarily lowering the string size, even if it 
> does include a BUG_ON()...

Here are all invocations of the macro in question:
        SARLSTR(textRegion, 48);
        SARLSTR(name, 16);

Still uncomfortable?

Jörn

-- 
Those who come seeking peace without a treaty are plotting.
-- Sun Tzu

<Prev in Thread] Current Thread [Next in Thread>