summaryrefslogtreecommitdiffstats
path: root/source/scrollbar.c
diff options
context:
space:
mode:
authorQC <qball@gmpclient.org>2015-10-18 19:02:19 +0200
committerQC <qball@gmpclient.org>2015-10-18 19:02:19 +0200
commit683632c36cd5874d6e65aa12a503b2cbf5c429a3 (patch)
treed3e1e56ddcbe703838a43a3d45786873f63b4970 /source/scrollbar.c
parente72da1bde5b10014917994922d3d4ef781beceaa (diff)
Some cleanups
Diffstat (limited to 'source/scrollbar.c')
-rw-r--r--source/scrollbar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/scrollbar.c b/source/scrollbar.c
index 21eb7077..eca41127 100644
--- a/source/scrollbar.c
+++ b/source/scrollbar.c
@@ -64,21 +64,21 @@ void scrollbar_free ( scrollbar *sb )
void scrollbar_set_max_value ( scrollbar *sb, unsigned int max )
{
if ( sb != NULL ) {
- sb->length = MAX ( 1, max );
+ sb->length = MAX ( 1u, max );
}
}
void scrollbar_set_handle ( scrollbar *sb, unsigned int pos )
{
if ( sb != NULL ) {
- sb->pos = MIN ( sb->length, MAX ( 0, pos ) );
+ sb->pos = MIN ( sb->length, pos );
}
}
void scrollbar_set_handle_length ( scrollbar *sb, unsigned int pos_length )
{
if ( sb != NULL ) {
- sb->pos_length = MIN ( sb->length, MAX ( 1, pos_length ) );
+ sb->pos_length = MIN ( sb->length, MAX ( 1u, pos_length ) );
}
}