[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] mount: fix check for if the flag should set or clear bits
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2012-06-22 13:39:44
Message-ID: CAK1hOcMK=jHmkzegm81rrLTbeMh5wNEvXsUijHznbgzR1FHEvQ () mail ! gmail ! com
[Download RAW message or body]
On Fri, Jun 22, 2012 at 2:58 PM, <richard.maw@codethink.co.uk> wrote:
> From: Richard Maw <richard.maw@codethink.co.uk>
>
> Changing the flags type to unsigned long broke this.
> Casting the flags to signed for the check works.
> ---
> util-linux/mount.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/util-linux/mount.c b/util-linux/mount.c
> index 220a4e6..9794574 100644
> --- a/util-linux/mount.c
> +++ b/util-linux/mount.c
> @@ -467,7 +467,7 @@ static unsigned long parse_mount_options(char *options, char **unrecognized)
> for (i = 0; i < ARRAY_SIZE(mount_options); i++) {
> if (strcasecmp(option_str, options) == 0) {
> unsigned long fl = mount_options[i];
> - if (fl < 0)
> + if (((long)fl) < 0)
> flags &= fl;
> else
> flags |= fl;
> --
> 1.7.5.4
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
Thanks, I just noticed this myself...
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic