Em Qui, 2007-11-15 às 09:43 +0800, kevin liu escreveu:
Dear everyone:
I am reading v4l2 tuner part code these days, when I come to mt20xx.c,
in microtune_init(), the use of the char pointer name maybe cause some
fatal error sometimes for this state:
You mean all the c compilers will give 'unknown' a special process???
On Nov 15, 2007 11:04 PM, Mauro Carvalho Chehab [EMAIL PROTECTED] wrote:
Em Qui, 2007-11-15 às 09:43 +0800, kevin liu escreveu:
Dear everyone:
I am reading v4l2 tuner part code these days, when I come to mt20xx.c,
Em Sex, 2007-11-16 às 09:08 +0800, kevin liu escreveu:
You mean all the c compilers will give 'unknown' a special process???
Huh?
I mean:
{
char *name = unknown;
and
{
char *name;
/* some code */
name = unknown;
are equivalent.
Cheers,
Mauro
On Nov 15, 2007 2:43 AM, kevin liu [EMAIL PROTECTED] wrote:
while pointer name doesn't have its memory.
Don't you confuse
char *foo = bar;
with
char *foo;
strcpy(foo, bar);
?
The first needs *no* runtime memory allocation, as it was pointed out.
The second does need runtime memory
Dear everyone:
I am reading v4l2 tuner part code these days, when I come to mt20xx.c,
in microtune_init(), the use of the char pointer name maybe cause some
fatal error sometimes for this state:
++
507 name = unknown;