mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user