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-02 20:03:26 +0100
commit935425c6861361f4e5346820725c45040fa073a4 (patch)
tree62609ff1df8d31f98e21399a11f284bc0a457fd6
parentef157f03fd22921011b56a97577f9c21f52cf4e1 (diff)
downloadNetworkManager-935425c6861361f4e5346820725c45040fa073a4.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 fdde5b306d..dcf713d6ed 100644
--- a/src/dhcp-manager/systemd-dhcp/src/shared/util.c
+++ b/src/dhcp-manager/systemd-dhcp/src/shared/util.c
@@ -1734,7 +1734,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)
@@ -4440,7 +4440,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)