1
0
forked from drath/libratbag

Switch ratbag_get_num_resolutions() to return an unsigned

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2016-03-11 12:43:47 +10:00
parent 6f9aa5aa24
commit be008cd86c
2 changed files with 4 additions and 4 deletions

View File

@@ -728,7 +728,7 @@ ratbag_profile_set_active(struct ratbag_profile *profile)
return rc;
}
LIBRATBAG_EXPORT int
LIBRATBAG_EXPORT unsigned int
ratbag_profile_get_num_resolutions(struct ratbag_profile *profile)
{
return profile->resolution.num_modes;
@@ -738,9 +738,9 @@ LIBRATBAG_EXPORT struct ratbag_resolution *
ratbag_profile_get_resolution(struct ratbag_profile *profile, unsigned int idx)
{
struct ratbag_resolution *res;
int max = ratbag_profile_get_num_resolutions(profile);
unsigned max = ratbag_profile_get_num_resolutions(profile);
if (max < 0 || idx >= (unsigned int)max)
if (idx >= max)
return NULL;
res = &profile->resolution.modes[idx];

View File

@@ -620,7 +620,7 @@ ratbag_profile_set_active(struct ratbag_profile *profile);
*
* @return The number of profiles available.
*/
int
unsigned int
ratbag_profile_get_num_resolutions(struct ratbag_profile *profile);
/**