mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
bus-unit-util: fix bus_wait_for_jobs() debug output (#8760)
We shouldn't print 'errno' if its not initialized properly.
This commit is contained in:
parent
4f4ef6a099
commit
d6b87637c5
@ -1971,6 +1971,8 @@ int bus_wait_for_jobs(BusWaitForJobs *d, bool quiet, const char* const* extra_ar
|
||||
if (q < 0 && r == 0)
|
||||
r = q;
|
||||
|
||||
errno = 0; /* Reset errno explicitly, so that log_debug_errno() will properly print 'Success'
|
||||
* for q == 0, instead of whatever is set in errno */
|
||||
log_debug_errno(q, "Got result %s/%m for job %s", strna(d->result), strna(d->name));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user