chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resolved: when answer A or AAAA questions, order responses by whether addresses are...
[elogind.git]
/
src
/
run
/
run.c
diff --git
a/src/run/run.c
b/src/run/run.c
index e4c695c5b505f08dcecc050c92c3236b2bb6d872..b9be1455c42dcc8c8cd38cbcdd1c0581a05fe1a3 100644
(file)
--- a/
src/run/run.c
+++ b/
src/run/run.c
@@
-335,11
+335,11
@@
static int start_transient_service(
_cleanup_free_ char *name = NULL;
int r;
_cleanup_free_ char *name = NULL;
int r;
- if (arg_unit)
+ if (arg_unit)
{
name = unit_name_mangle_with_suffix(arg_unit, MANGLE_NOGLOB, ".service");
name = unit_name_mangle_with_suffix(arg_unit, MANGLE_NOGLOB, ".service");
- else
-
asprintf(&name, "run-"PID_FMT".service", getpid()
);
-
if (!name
)
+ if (!name)
+
return log_oom(
);
+
} else if (asprintf(&name, "run-"PID_FMT".service", getpid()) < 0
)
return log_oom();
r = message_start_transient_unit_new(bus, name, &m);
return log_oom();
r = message_start_transient_unit_new(bus, name, &m);
@@
-471,11
+471,11
@@
static int start_transient_scope(
assert(bus);
assert(bus);
- if (arg_unit)
+ if (arg_unit)
{
name = unit_name_mangle_with_suffix(arg_unit, MANGLE_NOGLOB, ".scope");
name = unit_name_mangle_with_suffix(arg_unit, MANGLE_NOGLOB, ".scope");
- else
-
asprintf(&name, "run-"PID_FMT".scope", getpid()
);
-
if (!name
)
+ if (!name)
+
return log_oom(
);
+
} else if (asprintf(&name, "run-"PID_FMT".scope", getpid()) < 0
)
return log_oom();
r = message_start_transient_unit_new(bus, name, &m);
return log_oom();
r = message_start_transient_unit_new(bus, name, &m);
@@
-593,7
+593,7
@@
int main(int argc, char* argv[]) {
arg_description = description;
}
arg_description = description;
}
- r = bus_open_transport(arg_transport, arg_host, arg_user, &bus);
+ r = bus_open_transport
_systemd
(arg_transport, arg_host, arg_user, &bus);
if (r < 0) {
log_error("Failed to create bus connection: %s", strerror(-r));
goto finish;
if (r < 0) {
log_error("Failed to create bus connection: %s", strerror(-r));
goto finish;