Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
leleliu008 committed Jul 30, 2024
1 parent dd48e7e commit cbb302c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/openbsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
eval "$@"
}
run sudo pkg_add cmake ninja llvm pkgconf curl libgit2 libarchive libyaml jansson sqlite
run sudo pkg_add cmake ninja llvm pkgconf curl libgit2 libarchive libyaml jansson sqlite pcre2
run cmake -S . -B build.d -G Ninja -DCMAKE_INSTALL_PREFIX=./output -DCMAKE_VERBOSE_MAKEFILE=ON
run cmake --build build.d
Expand Down
6 changes: 3 additions & 3 deletions src/upgrade-self.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int uppm_upgrade_tar_filename(char buf[], const size_t bufSize, const cha
#elif defined (__DragonFly__)
ret = snprintf(buf, bufSize, "uppm-%s-%s-%s-%s.tar.xz", latestVersion, osType, osVers, osArch);
#elif defined (__FreeBSD__)
double v = atof(osVers * 10);
double v = atof(osVers) * 10;

if (v < 130) {
osVers[0] = '1';
Expand All @@ -79,7 +79,7 @@ static int uppm_upgrade_tar_filename(char buf[], const size_t bufSize, const cha

ret = snprintf(buf, bufSize, "uppm-%s-%s-%s-%s.tar.xz", latestVersion, osType, osVers, osArch);
#elif defined (__OpenBSD__)
double v = atof(osVers * 10);
double v = atof(osVers) * 10;

if (v < 73) {
osVers[0] = '7';
Expand All @@ -95,7 +95,7 @@ static int uppm_upgrade_tar_filename(char buf[], const size_t bufSize, const cha

ret = snprintf(buf, bufSize, "uppm-%s-%s-%s-%s.tar.xz", latestVersion, osType, osVers, osArch);
#elif defined (__NetBSD__)
double v = atof(osVers * 10);
double v = atof(osVers) * 10;

if (v < 92) {
osVers[0] = '9';
Expand Down

0 comments on commit cbb302c

Please sign in to comment.