1
1
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:
Lennart Poettering 2012-06-22 00:19:13 +02:00
parent 62bca2c657
commit 8b38f3cc3e
3 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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,

View File

@ -143,7 +143,6 @@ int main_analyze(const char *pack_path) {
return EXIT_SUCCESS;
fail:
fclose(pack);
return EXIT_FAILURE;