Re: [PATCH] xfsprogs: check for size parsing errors in xfs_quota

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

 



> -		v = (__uint64_t)cvtnum(blocksize, sectorsize, s);
> -		*value = v >> 9;	/* syscalls use basic blocks */
> +		v = cvtnum(blocksize, sectorsize, s);
> +		if (v == -1LL) {
> +			fprintf(stderr, _("%s: Error: could not parse size %s.\n"), progname, s);
> +			return 0;
> +		}
> +		*value = (__uint64_t)v >> 8;	/* syscalls use basic blocks */

Why do you replace the shift by nine with a shift by 8?

Also please don't introduce new overly long lines, just move the
translated string to a line of its own, indented by a single tab similar
to how we do it in most new xfs/xfsprogs code.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux