1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00

journal: fix compiler warning in journal_file_append_data()

gcc (4.8.2, arm) does not understand that journal_file_append_field()
will always set 'fo' when it returns 0, so this warning is bogus.

Anyway, fix it by initialiting fo = NULL.
This commit is contained in:
Daniel Mack 2014-02-20 17:24:36 +01:00
parent a002d44b00
commit 748db5928c

View File

@ -1012,8 +1012,8 @@ static int journal_file_append_data(
else
eq = memchr(data, '=', size);
if (eq && eq > data) {
Object *fo = NULL;
uint64_t fp;
Object *fo;
/* Create field object ... */
r = journal_file_append_field(f, data, (uint8_t*) eq - (uint8_t*) data, &fo, &fp);