summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-02-02 12:34:04 +0100
committerThomas Haller <thaller@redhat.com>2015-03-03 11:13:50 +0100
commit746d0f544c954dbad9a7bf2fef540fba499efcc0 (patch)
tree71e13b953c9ec5dc1cbc8f7950b4f6b71525751c
parentd568e539a672e808fe4601e79b92925660edbac6 (diff)
downloadNetworkManager-746d0f544c954dbad9a7bf2fef540fba499efcc0.tar.gz
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.
-rw-r--r--src/dhcp-manager/systemd-dhcp/src/shared/time-util.c7
-rw-r--r--src/dhcp-manager/systemd-dhcp/src/shared/util.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/dhcp-manager/systemd-dhcp/src/shared/time-util.c b/src/dhcp-manager/systemd-dhcp/src/shared/time-util.c
index 7b56a51191..f1e56b6e47 100644
--- a/src/dhcp-manager/systemd-dhcp/src/shared/time-util.c
+++ b/src/dhcp-manager/systemd-dhcp/src/shared/time-util.c
@@ -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;
}
-
diff --git a/src/dhcp-manager/systemd-dhcp/src/shared/util.c b/src/dhcp-manager/systemd-dhcp/src/shared/util.c
index e7a805a866..e48aea465d 100644
--- a/src/dhcp-manager/systemd-dhcp/src/shared/util.c
+++ b/src/dhcp-manager/systemd-dhcp/src/shared/util.c
@@ -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)