Re: [U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer

2013-01-04 Thread Wolfgang Denk
Dear James Yang, In message you wrote: > > > Hm... this adds a special case and as such increases complexity - and > > what is the benefit for you? > > The purpose is to avoid having to allocate memory for getenv_f() to What exactly is the problem of adding a dynamic variable on the stack?

Re: [U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer

2013-01-04 Thread James Yang
Hello Wolfgang, On Fri, 4 Jan 2013, Wolfgang Denk wrote: > Dear York Sun, > > In message <1357323245-12455-6-git-send-email-york...@freescale.com> you > wrote: > > From: James Yang > > > > getenv_f() searches the environment for a variable name and copies the > > value of the variable to a

Re: [U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer

2013-01-04 Thread Wolfgang Denk
Dear York Sun, In message <1357323245-12455-6-git-send-email-york...@freescale.com> you wrote: > From: James Yang > > getenv_f() searches the environment for a variable name and copies the > value of the variable to a buffer pointed to by one of the function's > parameters. However, this means

[U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer

2013-01-04 Thread York Sun
From: James Yang getenv_f() searches the environment for a variable name and copies the value of the variable to a buffer pointed to by one of the function's parameters. However, this means that the buffer needs to exist and needs to be of sufficient length (passed as another parameter to getenv