mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 19:00:11 +01:00
dhcp/trivial: remove unused fixes to our copy of the systemd code
Make our copy more similar to what systemd has by removing local changes that are unnecessary. These changes don't affect the build, because the code is excluded with #if 0.
This commit is contained in:
parent
d568e539a6
commit
746d0f544c
2 changed files with 6 additions and 5 deletions
|
|
@ -507,8 +507,9 @@ int parse_timestamp(const char *t, usec_t *usec) {
|
|||
return parse_sec(t + 1, usec);
|
||||
|
||||
else if (endswith(t, " ago")) {
|
||||
_cleanup_free_ char *z = strndup(t, strlen(t) - 4);
|
||||
_cleanup_free_ char *z;
|
||||
|
||||
z = strndup(t, strlen(t) - 4);
|
||||
if (!z)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -518,8 +519,9 @@ int parse_timestamp(const char *t, usec_t *usec) {
|
|||
|
||||
goto finish;
|
||||
} else if (endswith(t, " left")) {
|
||||
_cleanup_free_ char *z = strndup(t, strlen(t) - 4);
|
||||
_cleanup_free_ char *z;
|
||||
|
||||
z = strndup(t, strlen(t) - 4);
|
||||
if (!z)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -998,4 +1000,3 @@ clockid_t clock_boottime_or_monotonic(void) {
|
|||
|
||||
return clock;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1732,7 +1732,7 @@ bool fstype_is_network(const char *fstype) {
|
|||
}
|
||||
|
||||
int chvt(int vt) {
|
||||
_cleanup_close_ int fd = -1;
|
||||
_cleanup_close_ int fd;
|
||||
|
||||
fd = open_terminal("/dev/tty0", O_RDWR|O_NOCTTY|O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
|
|
@ -4438,7 +4438,7 @@ int terminal_vhangup_fd(int fd) {
|
|||
}
|
||||
|
||||
int terminal_vhangup(const char *name) {
|
||||
_cleanup_close_ int fd = -1;
|
||||
_cleanup_close_ int fd;
|
||||
|
||||
fd = open_terminal(name, O_RDWR|O_NOCTTY|O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue