mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-27 13:57:26 +03:00
journal: fix sd_journal_stream_fd()
This commit is contained in:
parent
62bca2c657
commit
8b38f3cc3e
@ -375,10 +375,11 @@ _public_ int sd_journal_stream_fd(const char *identifier, int priority, int leve
|
||||
identifier = "";
|
||||
|
||||
l = strlen(identifier);
|
||||
header = alloca(l + 1 + 2 + 2 + 2 + 2 + 2);
|
||||
header = alloca(l + 1 + 1 + 2 + 2 + 2 + 2 + 2);
|
||||
|
||||
memcpy(header, identifier, l);
|
||||
header[l++] = '\n';
|
||||
header[l++] = '\n';
|
||||
header[l++] = '0' + priority;
|
||||
header[l++] = '\n';
|
||||
header[l++] = '0' + !!level_prefix;
|
||||
|
@ -460,7 +460,8 @@ static void dispatch_message_real(
|
||||
struct iovec *iovec, unsigned n, unsigned m,
|
||||
struct ucred *ucred,
|
||||
struct timeval *tv,
|
||||
const char *label, size_t label_len, const char *unit_id) {
|
||||
const char *label, size_t label_len,
|
||||
const char *unit_id) {
|
||||
|
||||
char *pid = NULL, *uid = NULL, *gid = NULL,
|
||||
*source_time = NULL, *boot_id = NULL, *machine_id = NULL,
|
||||
|
@ -143,7 +143,6 @@ int main_analyze(const char *pack_path) {
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
|
||||
fail:
|
||||
fclose(pack);
|
||||
return EXIT_FAILURE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user