projects
/
platform
/
upstream
/
zypper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c0a83e
)
fix signed/unsigned comparison
author
Michael Andres
<ma@suse.de>
Fri, 16 May 2014 08:55:00 +0000
(10:55 +0200)
committer
Michael Andres
<ma@suse.de>
Fri, 16 May 2014 08:55:00 +0000
(10:55 +0200)
src/output/Out.cc
patch
|
blob
|
history
diff --git
a/src/output/Out.cc
b/src/output/Out.cc
index
bb80033
..
fa38cd0
100644
(file)
--- a/
src/output/Out.cc
+++ b/
src/output/Out.cc
@@
-46,7
+46,8
@@
std::string TermLine::get( unsigned width_r, SplitFlags flags_r, char exp_r ) co
if ( percentHint == 0 )
return zypp::str::Str() << l << std::string( diff, '-' ) << r;
- int pc = diff * percentHint / 100;
+
+ unsigned pc = diff * percentHint / 100; // diff > 0 && percentHint > 0
if ( diff < 6 ) // not enough space for fancy stuff
return zypp::str::Str() << l << std::string( pc, '.' ) << std::string( diff-pc, '=' ) << r;