Re: [PATCH 2/2] Move unsigned long option parsing out of pack-objects.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Charles Bailey <charles@xxxxxxxxxxxxx> writes:

> On Sun, Jun 21, 2015 at 07:25:44PM +0100, Charles Bailey wrote:
>> From: Charles Bailey <cbailey32@xxxxxxxxxxxxx>
>> 
>> diff --git a/parse-options.c b/parse-options.c
>> index 80106c0..101b649 100644
>> --- a/parse-options.c
>> +++ b/parse-options.c
>> @@ -180,6 +180,23 @@ static int get_value(struct parse_opt_ctx_t *p,
>>  			return opterror(opt, "expects a numerical value", flags);
>>  		return 0;
>>  
>> +	case OPTION_MAGNITUDE:
>> +		if (unset) {
>> +			*(unsigned long *)opt->value = 0;
>> +			return 0;
>> +		}
>> +		if (opt->flags & PARSE_OPT_OPTARG && !p->opt) {
>> +			*(unsigned long *)opt->value = opt->defval;
>> +			return 0;
>> +		}
>> +		if (get_arg(p, opt, flags, &arg))
>> +			return -1;
>> +		if (!git_parse_ulong(arg, opt->value))
>> +			return opterror(opt,
>> +				"expects a integer value with an optional k/m/g suffix",
>> +				flags);
>> +		return 0;
>> +
>
> Spotted after sending:
> s/expects a integer/expects an integer/

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]