[Reviews] Code correction and improvement

This commit is contained in:
devdl11
2022-04-08 13:49:44 +02:00
parent c65b1c6d3c
commit 62e98107f7
25 changed files with 61 additions and 59 deletions

10
bootloader/utility.cpp Normal file
View File

@@ -0,0 +1,10 @@
#include <bootloader/utility.h>
#include <string.h>
int Bootloader::Utility::versionSum(const char * version, int length) {
int sum = 0;
for (int i = 0; i < length; i++) {
sum += version[i] * (strlen(version) * 100 - i * 10);
}
return sum;
}