This patch fixes coverity scan MISSING_BREAK issues, and also an error
on block size check.
Signed-off-by: John Chau <john@harmon.hk>
srcbz = srcdesc->blksz;
destbz = destdesc->blksz;
- if ((srcbz * (buffersize / srcbz) != buffersize) &&
+ if ((srcbz * (buffersize / srcbz) != buffersize) ||
(destbz * (buffersize / destbz) != buffersize)) {
printf("failed: cannot match device block sizes\n");
return 1;
switch (unit[0]) {
case 'g':
case 'G':
- requested *= 1024;
+ requested *= 1024 * 1024 * 1024;
+ break;
case 'm':
case 'M':
- requested *= 1024;
+ requested *= 1024 * 1024;
+ break;
case 'k':
case 'K':
requested *= 1024;