chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use initalization instead of explicit zeroing
[elogind.git]
/
src
/
shared
/
install.c
diff --git
a/src/shared/install.c
b/src/shared/install.c
index b82d1891dd3846af67ae6b1879b82400c936ea3f..9e870392f232c0c620b429351793ba2c2e5deb28 100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-700,7
+700,7
@@
int unit_file_link(
UnitFileChange **changes,
unsigned *n_changes) {
UnitFileChange **changes,
unsigned *n_changes) {
- LookupPaths _cleanup_lookup_paths_free_ paths = {
NULL
};
+ LookupPaths _cleanup_lookup_paths_free_ paths = {};
char **i;
char _cleanup_free_ *config_path = NULL;
int r, q;
char **i;
char _cleanup_free_ *config_path = NULL;
int r, q;
@@
-1116,7
+1116,7
@@
static int unit_file_can_install(
const char *name,
bool allow_symlink) {
const char *name,
bool allow_symlink) {
- InstallContext _cleanup_install_context_done_ c = {
NULL
};
+ InstallContext _cleanup_install_context_done_ c = {};
InstallInfo *i;
int r;
InstallInfo *i;
int r;
@@
-1452,8
+1452,8
@@
int unit_file_enable(
UnitFileChange **changes,
unsigned *n_changes) {
UnitFileChange **changes,
unsigned *n_changes) {
- LookupPaths _cleanup_lookup_paths_free_ paths = {
NULL
};
- InstallContext _cleanup_install_context_done_ c = {
NULL
};
+ LookupPaths _cleanup_lookup_paths_free_ paths = {};
+ InstallContext _cleanup_install_context_done_ c = {};
char **i;
char _cleanup_free_ *config_path = NULL;
int r;
char **i;
char _cleanup_free_ *config_path = NULL;
int r;
@@
-1491,8
+1491,8
@@
int unit_file_disable(
UnitFileChange **changes,
unsigned *n_changes) {
UnitFileChange **changes,
unsigned *n_changes) {
- LookupPaths _cleanup_lookup_paths_free_ paths = {
NULL
};
- InstallContext _cleanup_install_context_done_ c = {
NULL
};
+ LookupPaths _cleanup_lookup_paths_free_ paths = {};
+ InstallContext _cleanup_install_context_done_ c = {};
char **i;
char _cleanup_free_ *config_path = NULL;
Set _cleanup_set_free_free_ *remove_symlinks_to = NULL;
char **i;
char _cleanup_free_ *config_path = NULL;
Set _cleanup_set_free_free_ *remove_symlinks_to = NULL;
@@
-1533,8
+1533,8
@@
int unit_file_reenable(
UnitFileChange **changes,
unsigned *n_changes) {
UnitFileChange **changes,
unsigned *n_changes) {
- LookupPaths _cleanup_lookup_paths_free_ paths = {
NULL
};
- InstallContext _cleanup_install_context_done_ c = {
NULL
};
+ LookupPaths _cleanup_lookup_paths_free_ paths = {};
+ InstallContext _cleanup_install_context_done_ c = {};
char **i;
char _cleanup_free_ *config_path = NULL;
Set _cleanup_set_free_free_ *remove_symlinks_to = NULL;
char **i;
char _cleanup_free_ *config_path = NULL;
Set _cleanup_set_free_free_ *remove_symlinks_to = NULL;
@@
-1576,7
+1576,7
@@
UnitFileState unit_file_get_state(
const char *root_dir,
const char *name) {
const char *root_dir,
const char *name) {
- LookupPaths _cleanup_lookup_paths_free_ paths = {
NULL
};
+ LookupPaths _cleanup_lookup_paths_free_ paths = {};
UnitFileState state = _UNIT_FILE_STATE_INVALID;
char **i;
char _cleanup_free_ *path = NULL;
UnitFileState state = _UNIT_FILE_STATE_INVALID;
char **i;
char _cleanup_free_ *path = NULL;
@@
-1658,7
+1658,7
@@
int unit_file_query_preset(UnitFileScope scope, const char *name) {
assert(name);
if (scope == UNIT_FILE_SYSTEM)
assert(name);
if (scope == UNIT_FILE_SYSTEM)
- r = conf_files_list(&files, ".preset",
+ r = conf_files_list(&files, ".preset",
NULL,
"/etc/systemd/system-preset",
"/usr/local/lib/systemd/system-preset",
"/usr/lib/systemd/system-preset",
"/etc/systemd/system-preset",
"/usr/local/lib/systemd/system-preset",
"/usr/lib/systemd/system-preset",
@@
-1667,7
+1667,7
@@
int unit_file_query_preset(UnitFileScope scope, const char *name) {
#endif
NULL);
else if (scope == UNIT_FILE_GLOBAL)
#endif
NULL);
else if (scope == UNIT_FILE_GLOBAL)
- r = conf_files_list(&files, ".preset",
+ r = conf_files_list(&files, ".preset",
NULL,
"/etc/systemd/user-preset",
"/usr/local/lib/systemd/user-preset",
"/usr/lib/systemd/user-preset",
"/etc/systemd/user-preset",
"/usr/local/lib/systemd/user-preset",
"/usr/lib/systemd/user-preset",
@@
-1734,8
+1734,8
@@
int unit_file_preset(
UnitFileChange **changes,
unsigned *n_changes) {
UnitFileChange **changes,
unsigned *n_changes) {
- LookupPaths _cleanup_lookup_paths_free_ paths = {
NULL
};
- InstallContext _cleanup_install_context_done_ plus = {
NULL
}, minus = {NULL};
+ LookupPaths _cleanup_lookup_paths_free_ paths = {};
+ InstallContext _cleanup_install_context_done_ plus = {}, minus = {NULL};
char **i;
char _cleanup_free_ *config_path = NULL;
Set _cleanup_set_free_free_ *remove_symlinks_to = NULL;
char **i;
char _cleanup_free_ *config_path = NULL;
Set _cleanup_set_free_free_ *remove_symlinks_to = NULL;
@@
-1800,7
+1800,7
@@
int unit_file_get_list(
const char *root_dir,
Hashmap *h) {
const char *root_dir,
Hashmap *h) {
- LookupPaths _cleanup_lookup_paths_free_ paths = {
NULL
};
+ LookupPaths _cleanup_lookup_paths_free_ paths = {};
char **i;
char _cleanup_free_ *buf = NULL;
DIR _cleanup_closedir_ *d = NULL;
char **i;
char _cleanup_free_ *buf = NULL;
DIR _cleanup_closedir_ *d = NULL;