[yocto] [PATCH v2 4/5] rmc: remove unnecessary return variable

Jianxun Zhang jianxun.zhang at linux.intel.com
Fri Feb 10 11:22:16 PST 2017


Nice. Review +1

> On Feb 9, 2017, at 11:17 AM, Todor Minchev <todor.minchev at linux.intel.com> wrote:
> 
> Signed-off-by: Todor Minchev <todor.minchev at linux.intel.com>
> ---
> src/rmc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/rmc.c b/src/rmc.c
> index f3a2a5e..b5c7847 100644
> --- a/src/rmc.c
> +++ b/src/rmc.c
> @@ -218,7 +218,6 @@ read_fp_done:
> static rmc_file_t *read_policy_file(char *pathname, int type) {
>     rmc_file_t *tmp = NULL;
>     rmc_size_t policy_len = 0;
> -    int ret;
>     char *path_token;
> 
>     if ((tmp = calloc(1, sizeof(rmc_file_t))) == NULL) {
> @@ -230,8 +229,7 @@ static rmc_file_t *read_policy_file(char *pathname, int type) {
>     tmp->next = NULL;
> 
>     if (type == RMC_GENERIC_FILE) {
> -        ret = read_file(pathname, (char **)&tmp->blob, &policy_len);
> -        if (ret) {
> +        if (read_file(pathname, (char **)&tmp->blob, &policy_len)) {
>             fprintf(stderr, "Failed to read file %s\n\n", pathname);
>             free(tmp);
>             return NULL;
> -- 
> 2.11.1
> 




More information about the yocto mailing list