Hello all,
Is it possible to connect two eth interfaces from different umls
together w/o using a switch ? I've tried by having them two go through
different host tap devices, as in:
tunctl -u user -t tap0
ip a a 192.168.2.100/24 dev tap0
ip l s dev tap0 up
tunctl -u user -t tap1
ip a a 192.16
On Sun, Nov 08, 2009 at 09:42:00AM -0500, lanas wrote:
> Is it possible to connect two eth interfaces from different umls
> together w/o using a switch ? I've tried by having them two go
> through different host tap devices, as in:
>
> tunctl -u user -t tap0
> ip a a 192.168.2.100/24 dev tap0
>
Change "" to "(null)" and make it a static const char[] hoping that
the compiler will make null_str a label to a read-only area containing it.
See:
http://people.redhat.com/drepper/dsohowto.pdf part 2.4.2
http://udrepper.livejournal.com/13851.html
http://udrepper.livejournal.com/15119.html
Signed
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 10 ++
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 002f462..403e835 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1445,13 +1445,15 @@ do
It decreases code size as well:
textdata bss dec hex filename
15767 0 8 157753d9f lib/vsprintf.o-before
15735 0 8 157433d7f lib/vsprintf.o-TOLOWER
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 15
It decreases code size:
textdata bss dec hex filename
15719 0 8 157273d6f lib/vsprintf.o-before
15543 0 8 155513cbf lib/vsprintf.o-after
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 19 +
... so that strlen() iterates over a smaller string comprising of the
remaining characters only.
Signed-off-by: André Goddard Rosa
---
lib/string.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/string.c b/lib/string.c
index d9a51d5..cf86eab 100644
--- a/lib/stri
No functional change, just refactor the code so that it avoid checking
"if (hi)" two times in a sequence, taking advantage of previous check made.
It also reduces code size:
textdata bss dec hex filename
15735 0 8 157433d7f lib/vsprintf.o-before
15719
This patch reduces lib.a code size by 173 bytes on my Core 2 with gcc 4.4.1
even considering that it exports a newly defined function skip_spaces()
to drivers:
textdata bss dec hex filename
64867 840 592 66299 102fb (TOTALS-lib.a-before)
On the following sentence:
while (*s && isspace(*s))
s++;
If *s == 0, isspace() evaluates to ((_ctype[*s] & 0x20) != 0), which
evaluates to ((0x08 & 0x20) != 0) which equals to 0 as well.
If *s == 1, we depend on isspace() result anyway.
In other words, "a char equals zero is never a
The difference between simple_strtoul() and simple_strtoull() is just
the size of the variable used to keep track of the sum of characters
converted to numbers:
unsigned long simple_strtoul() {...}
unsigned long long simple_strtoull(){...}
Both are same size (8 bytes) on my Core 2/gcc 4.4.1.
Over
Most relevant complaints were addressed.
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 186 ++--
1 files changed, 99 insertions(+), 87 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 403
Cleanup by moving variables closer to the scope where they're used in fact.
Also, remove unneeded ones.
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 64 ---
1 files changed, 28 insertions(+), 36 deleti
While at it, use tabs to indent the comments.
Signed-off-by: André Goddard Rosa
---
include/linux/ctype.h |2 +-
lib/ctype.c | 50
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/include/linux/ctype.h b/include/lin
Makes use of skip_spaces() defined in lib/string.c for removing leading
spaces from strings all over the tree.
Also, while at it, if we see (*str && isspace(*str)), we can be sure to
remove the first condition (*str) as the second one (isspace(*str)) also
evaluates to 0 whenever *str == 0, making
On Sat, 7 Nov 2009 13:16:18 -0200
André Goddard Rosa wrote:
> On the following sentence:
> while (*s && isspace(*s))
> s++;
Looks fine but for one thing: it's actually shorter inline than moved
into /lib so at the very least it should be a header inline not a
function call.
Second
> > Also, while at it, if we see (*str && isspace(*str)), we can be sure to
> > remove the first condition (*str) as the second one (isspace(*str)) also
> > evaluates to 0 whenever *str == 0, making it redundant. In other words,
> > "a char equals zero is never a space".
I tried the following sema
Hi, James!
On Sun, Nov 8, 2009 at 2:05 PM, James Bottomley
wrote:
> On Sat, 2009-11-07 at 13:16 -0200, André Goddard Rosa wrote:
>> This patch reduces lib.a code size by 173 bytes on my Core 2 with gcc 4.4.1
>> even considering that it exports a newly defined function skip_spaces()
>> to drivers:
On Sat, 2009-11-07 at 13:16 -0200, André Goddard Rosa wrote:
> This patch reduces lib.a code size by 173 bytes on my Core 2 with gcc 4.4.1
> even considering that it exports a newly defined function skip_spaces()
> to drivers:
>textdata bss dec hex filename
On Sat, Nov 07, 2009 at 01:16:20PM -0200, André Goddard Rosa wrote:
> Makes use of skip_spaces() defined in lib/string.c for removing leading
> spaces from strings all over the tree.
>
> Also, while at it, if we see (*str && isspace(*str)), we can be sure to
> remove the first condition (*str) as
20 matches
Mail list logo