env-util: also rename getenv_uint64_secure() → secure_getenv_uint64()

As in the previous commit, let's not change the order of the words
compared to the underlying glibc API.
This commit is contained in:
Lennart Poettering
2024-02-28 14:59:31 +01:00
parent efb9b3bab2
commit dbe253aa9d
3 changed files with 3 additions and 3 deletions

View File

@@ -973,7 +973,7 @@ int secure_getenv_bool(const char *p) {
return parse_boolean(e);
}
int getenv_uint64_secure(const char *p, uint64_t *ret) {
int secure_getenv_uint64(const char *p, uint64_t *ret) {
const char *e;
assert(p);

View File

@@ -64,7 +64,7 @@ char *strv_env_pairs_get(char **l, const char *name) _pure_;
int getenv_bool(const char *p);
int secure_getenv_bool(const char *p);
int getenv_uint64_secure(const char *p, uint64_t *ret);
int secure_getenv_uint64(const char *p, uint64_t *ret);
/* Like setenv, but calls unsetenv if value == NULL. */
int set_unset_env(const char *name, const char *value, bool overwrite);

View File

@@ -569,7 +569,7 @@ static int write_temporary_passwd(
static usec_t epoch_or_now(void) {
uint64_t epoch;
if (getenv_uint64_secure("SOURCE_DATE_EPOCH", &epoch) >= 0) {
if (secure_getenv_uint64("SOURCE_DATE_EPOCH", &epoch) >= 0) {
if (epoch > UINT64_MAX/USEC_PER_SEC) /* Overflow check */
return USEC_INFINITY;
return (usec_t) epoch * USEC_PER_SEC;