]> git.ipfire.org Git - thirdparty/mdadm.git/commit
fix: adjust parse_size() to the unsigned size variable
authorLukasz Dorau <lukasz.dorau@intel.com>
Fri, 14 Sep 2012 14:12:45 +0000 (16:12 +0200)
committerNeilBrown <neilb@suse.de>
Thu, 20 Sep 2012 02:27:17 +0000 (12:27 +1000)
commit51d4261ca9fa5f1e6b09ff1e6891ae762ee60a57
tree2362df500201b978de0cc23b58280a1758bb63eb
parentd5d2c614739a2370e295d9e83594b9c52a11b887
fix: adjust parse_size() to the unsigned size variable

An error in parse_size() should be reported by 0, not -1,
because -1 is changed to the max value of unsigned long long
during calculations of size (e.g. at mdadm.c:412).

A negative value of size should be reported as error
(e.g. size equal -1 has been changed to the max value of
unsigned long long so far).

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
mdadm.h
util.c