[U-Boot] [U-Boot, 2/6] travis-ci: use correct exit code on errors

Tom Rini trini at konsulko.com
Sat Oct 29 19:41:12 CEST 2016


On Wed, Oct 26, 2016 at 11:05:32AM -0600, Stephen Warren wrote:

> From: Stephen Warren <swarren at nvidia.com>
> 
> The phrase "if [ $? -ne 0 ]; then exit $?; fi" doesn't work correctly;
> by the time the "exit" statement runs, $? has already been over-written
> by the result of the [ command. Fix this by explicitly storing $? and
> then using that stored value in both the test and the error-case exit
> statement.
> 
> This change also converts from textual comparison to integer comparison,
> since the exit code is an integer and there's no need to convert it to
> a string for comparison.
> 
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> Reviewed-by: Heiko Schocher <hs at denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161029/2db0863c/attachment.sig>


More information about the U-Boot mailing list