auc: move function to right place

Change order of functions defined to fix build.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2021-08-14 13:59:45 +01:00
parent 243c86ffc8
commit 6c784dff2b
No known key found for this signature in database
GPG Key ID: 5A8F39C31C3217CA
1 changed files with 16 additions and 12 deletions

View File

@ -417,9 +417,24 @@ static int verrevcmp(const char *val, const char *ref)
return 0;
}
/*
* replace '-rc' by '~' in string
*/
static inline void release_replace_rc(char *ver)
{
char *tmp;
tmp = strstr(ver, "-rc");
if (tmp && strlen(tmp) > 3) {
*tmp = '~';
strcpy(tmp + 1, tmp + 3);
}
}
/*
* OpenWrt release version string comperator
* replaces '-rc' by '~' to fix ordering of release(s) (candidates).
* replaces '-rc' by '~' to fix ordering of release(s) (candidates)
* using the void release_replace_rc(char *ver) function above.
*/
static int openwrt_release_verrevcmp(const char *ver1, const char *ver2)
{
@ -1210,17 +1225,6 @@ static int request_branches(bool only_active)
return 0;
}
static inline void release_replace_rc(char *ver)
{
char *tmp;
tmp = strstr(ver, "-rc");
if (tmp && strlen(tmp) > 3) {
*tmp = '~';
strcpy(tmp + 1, tmp + 3);
}
}
static struct branch *select_branch(char *name, char *select_version)
{
struct branch *br, *abr = NULL;