From 21f639446d6bccb6cc550140d36bd3ebd74fcee8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Aug 2017 12:22:16 -0600 Subject: env: Adjust the get_char() method to return an int In principle this can fail, e.g. if the index is out of range. Adjust the driver signature to allow returning an error code. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- include/environment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/environment.h') diff --git a/include/environment.h b/include/environment.h index 9a442152355..ba8af28414b 100644 --- a/include/environment.h +++ b/include/environment.h @@ -227,9 +227,9 @@ struct env_driver { * will read from gd->env_addr. * * @index: Index of character to read (0=first) - * @return character read + * @return character read, or -ve on error */ - unsigned char (*get_char)(int index); + int (*get_char)(int index); /** * load() - Load the environment from storage -- cgit v1.2.3