-/**
- * Compare two release numbers
- *
- * \param p1 first release
- * \param p2 second release
- * \return UpdateReleaseStatus(Older|Equal|Newer)
- */
-static int CompareReleases( const struct update_release_t *p1,
- const struct update_release_t *p2 )
-{
- int32_t d;
- d = ( p1->i_major << 24 ) + ( p1->i_minor << 16 ) + ( p1->i_revision << 8 )
- - ( p2->i_major << 24 ) - ( p2->i_minor << 16 ) - ( p2->i_revision << 8 )
- + ( p1->extra ) - ( p2->extra );
-
- if( d < 0 )
- return UpdateReleaseStatusOlder;
- else if( d == 0 )
- return UpdateReleaseStatusEqual;
- else
- return UpdateReleaseStatusNewer;
-}
-