diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-22 10:52:12 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-22 14:10:31 +0900 |
commit | 2e4effd129343d22bfed34e94810d3f87c8f0e85 (patch) | |
tree | 4eeebbd8eff6297d339657f4ef30d849162c089f /src/pstore/pstore.c | |
parent | 3f708e7f6909faad307bdb60ed0f8d68e84f6584 (diff) | |
download | systemd-2e4effd129343d22bfed34e94810d3f87c8f0e85.tar.gz |
pstore: drop unnecessary initializations
Diffstat (limited to 'src/pstore/pstore.c')
-rw-r--r-- | src/pstore/pstore.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/pstore/pstore.c b/src/pstore/pstore.c index 0c4e2f08a3..0febbcb716 100644 --- a/src/pstore/pstore.c +++ b/src/pstore/pstore.c @@ -116,14 +116,12 @@ static int compare_pstore_entries(const void *_a, const void *_b) { } static int move_file(PStoreEntry *pe, const char *subdir) { - _cleanup_free_ char *ifd_path = NULL; - _cleanup_free_ char *ofd_path = NULL; - int r = 0; - struct iovec iovec[2] = {}; - int n_iovec = 0; + _cleanup_free_ char *ifd_path = NULL, *ofd_path = NULL; _cleanup_free_ void *field = NULL; - const char *suffix = NULL; + struct iovec iovec[2]; + const char *suffix; size_t field_size; + int n_iovec = 0, r; if (pe->handled) return 0; @@ -205,10 +203,9 @@ static int write_dmesg(const char *dmesg, size_t size, const char *id) { static void process_dmesg_files(PStoreList *list) { /* Move files, reconstruct dmesg.txt */ - PStoreEntry *pe; - _cleanup_free_ char *dmesg = NULL; + _cleanup_free_ char *dmesg = NULL, *dmesg_id = NULL; size_t dmesg_size = 0; - _cleanup_free_ char *dmesg_id = NULL; + PStoreEntry *pe; /* Handle each dmesg file: files processed in reverse * order so as to properly reconstruct original dmesg */ |