summaryrefslogtreecommitdiffstats
path: root/src/import/export-raw.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-11-23 19:52:35 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-11-23 19:53:18 +0100
commit0d94088e4e9e00f5ca9afdb8e68c94558fe23268 (patch)
tree26f8388c8cb35e437a785d093c360f54509dc57f /src/import/export-raw.c
parentimport: use _cleanup_ attribute for CURL object (diff)
downloadsystemd-0d94088e4e9e00f5ca9afdb8e68c94558fe23268.tar.xz
systemd-0d94088e4e9e00f5ca9afdb8e68c94558fe23268.zip
import: use structured initializers
Diffstat (limited to 'src/import/export-raw.c')
-rw-r--r--src/import/export-raw.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/import/export-raw.c b/src/import/export-raw.c
index f3a34d40c5..04ad129ca1 100644
--- a/src/import/export-raw.c
+++ b/src/import/export-raw.c
@@ -86,16 +86,19 @@ int raw_export_new(
assert(ret);
- e = new0(RawExport, 1);
+ e = new(RawExport, 1);
if (!e)
return -ENOMEM;
- e->output_fd = e->input_fd = -1;
- e->on_finished = on_finished;
- e->userdata = userdata;
+ *e = (RawExport) {
+ .output_fd = -1,
+ .input_fd = -1,
+ .on_finished = on_finished,
+ .userdata = userdata,
+ .last_percent = (unsigned) -1,
+ };
RATELIMIT_INIT(e->progress_rate_limit, 100 * USEC_PER_MSEC, 1);
- e->last_percent = (unsigned) -1;
if (event)
e->event = sd_event_ref(event);