[sheepdog] [PATCH v1] dog/vdi: replace strtoll with strtoull

Hitoshi Mitake mitake.hitoshi at gmail.com
Wed Sep 3 08:26:30 CEST 2014


On Sun, Aug 31, 2014 at 3:20 PM, Bingpeng Zhu <nkuzbp at foxmail.com> wrote:
> oid is of uint64_t type, VDI object oid is started with 0x80,
> which is large than the maximum of long long int. So, we should
> replace strtoll with strtoull in function vdi_parser().
>
> Signed-off-by: Bingpeng Zhu <bingpeng.zbp at alibaba-inc.com>
> ---
>  dog/vdi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.
Hitoshi

>
> diff --git a/dog/vdi.c b/dog/vdi.c
> index 9230715..32b3e57 100644
> --- a/dog/vdi.c
> +++ b/dog/vdi.c
> @@ -3021,7 +3021,7 @@ static int vdi_parser(int ch, const char *opt)
>                 vdi_cmd_data.store_policy = 1;
>                 break;
>         case 'o':
> -               vdi_cmd_data.oid = strtoll(opt, &p, 16);
> +               vdi_cmd_data.oid = strtoull(opt, &p, 16);
>                 if (opt == p) {
>                         sd_err("object id must be a hex integer");
>                         exit(EXIT_FAILURE);
> --
> 1.7.1
>
>
>
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list