From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Thu, 12 Nov 2020 20:51:08 +0100 Subject: [PATCH 3/5] env: make env_set_default_vars() return void In-Reply-To: <20201110202603.20944-4-rasmus.villemoes@prevas.dk> References: <20201110202603.20944-1-rasmus.villemoes@prevas.dk> <20201110202603.20944-4-rasmus.villemoes@prevas.dk> Message-ID: <8124.1605210668@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Rasmus, In message <20201110202603.20944-4-rasmus.villemoes@prevas.dk> you wrote: > Unlike most other functions declared in env.h, the return value of > this one also isn't documented. It only has a single caller, which > ignores the return value. And the companion, env_set_default(), > already has void as return type. > > Signed-off-by: Rasmus Villemoes Naked-by: Wolfgang Denk This is not a good idea. himport_r() can run into problems, and then it returns an error code. Ignoring errors is never correct. Instead, the caller should be fixed to add proper error handling. env_set_default() at least prints a proper error message. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Don't have a battle of wits with an unarmed opponent.