[systemd-devel] [PATCH] mount: properly check return for mount_add_*

Lennart Poettering lennart at poettering.net
Mon Mar 5 17:16:57 PST 2012


On Fri, 17.02.12 12:17, Dave Reisner (d at falconindy.com) wrote:

> Previously, mount_load_etc_fstab() could never fail for reasons other
> than a setmntent() or allocation failure.

Applied. Thanks!

> ---
>  src/mount.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/mount.c b/src/mount.c
> index 0ae964b..5e52a54 100644
> --- a/src/mount.c
> +++ b/src/mount.c
> @@ -1578,7 +1578,7 @@ static int mount_load_etc_fstab(Manager *m) {
>                  free(what);
>                  free(where);
>  
> -                if (r < 0)
> +                if (k < 0)
>                          r = k;
>          }
>  


Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list