mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
tree-wide: drop pointless zero initialization (#16900)
This commit is contained in:
parent
28e2641a1a
commit
6d95e7d9b2
@ -1695,7 +1695,7 @@ int sd_dhcp6_client_is_running(sd_dhcp6_client *client) {
|
||||
|
||||
int sd_dhcp6_client_start(sd_dhcp6_client *client) {
|
||||
enum DHCP6State state = DHCP6_STATE_SOLICITATION;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
assert_return(client, -EINVAL);
|
||||
assert_return(client->event, -EINVAL);
|
||||
|
@ -477,7 +477,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
_cleanup_strv_free_ char **match_list = NULL;
|
||||
uint32_t line_number = 0;
|
||||
int r = 0, err;
|
||||
int r, err;
|
||||
|
||||
f = fopen(filename, "re");
|
||||
if (!f)
|
||||
|
@ -53,7 +53,7 @@ static int getnameinfo_handler(sd_resolve_query *q, int ret, const char *host, c
|
||||
int main(int argc, char *argv[]) {
|
||||
_cleanup_(sd_resolve_query_unrefp) sd_resolve_query *q1 = NULL, *q2 = NULL;
|
||||
_cleanup_(sd_resolve_unrefp) sd_resolve *resolve = NULL;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
struct addrinfo hints = {
|
||||
.ai_family = PF_UNSPEC,
|
||||
|
@ -478,7 +478,7 @@ int config_parse_n_autovts(
|
||||
|
||||
static int vt_is_busy(unsigned vtnr) {
|
||||
struct vt_stat vt_stat;
|
||||
int r = 0;
|
||||
int r;
|
||||
_cleanup_close_ int fd;
|
||||
|
||||
assert(vtnr >= 1);
|
||||
|
@ -202,7 +202,7 @@ static void session_save_devices(Session *s, FILE *f) {
|
||||
int session_save(Session *s) {
|
||||
_cleanup_free_ char *temp_path = NULL;
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
assert(s);
|
||||
|
||||
|
@ -136,7 +136,7 @@ static int manager_add_host_machine(Manager *m) {
|
||||
static int manager_enumerate_machines(Manager *m) {
|
||||
_cleanup_closedir_ DIR *d = NULL;
|
||||
struct dirent *de;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
assert(m);
|
||||
|
||||
|
@ -84,7 +84,7 @@ static int context_save(Context *context) {
|
||||
NetDev *netdev;
|
||||
Link *link;
|
||||
Iterator i;
|
||||
int k, r = 0;
|
||||
int k, r;
|
||||
const char *p;
|
||||
|
||||
p = prefix_roota(arg_root, NETWORKD_UNIT_DIRECTORY);
|
||||
|
@ -8,7 +8,7 @@ int module_load_and_warn(struct kmod_ctx *ctx, const char *module, bool verbose)
|
||||
const int probe_flags = KMOD_PROBE_APPLY_BLACKLIST;
|
||||
struct kmod_list *itr;
|
||||
_cleanup_(kmod_module_unref_listp) struct kmod_list *modlist = NULL;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
/* verbose==true means we should log at non-debug level if we
|
||||
* fail to find or load the module. */
|
||||
|
@ -1941,7 +1941,7 @@ static int seccomp_restrict_sxid(scmp_filter_ctx seccomp, mode_t m) {
|
||||
*
|
||||
* Returns error if *everything* failed, and 0 otherwise.
|
||||
*/
|
||||
int r = 0;
|
||||
int r;
|
||||
bool any = false;
|
||||
|
||||
r = seccomp_rule_add_exact(
|
||||
|
@ -1064,7 +1064,7 @@ static int list_sockets(int argc, char *argv[], void *userdata) {
|
||||
struct socket_info *s;
|
||||
unsigned cs = 0;
|
||||
size_t size = 0;
|
||||
int r = 0, n;
|
||||
int r, n;
|
||||
sd_bus *bus;
|
||||
|
||||
r = acquire_bus(BUS_MANAGER, &bus);
|
||||
@ -1333,7 +1333,7 @@ static int list_timers(int argc, char *argv[], void *userdata) {
|
||||
int n, c = 0;
|
||||
dual_timestamp nw;
|
||||
sd_bus *bus;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
r = acquire_bus(BUS_MANAGER, &bus);
|
||||
if (r < 0)
|
||||
@ -1731,7 +1731,7 @@ static int list_dependencies_one(
|
||||
|
||||
_cleanup_strv_free_ char **deps = NULL;
|
||||
char **c;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
assert(bus);
|
||||
assert(name);
|
||||
@ -2397,7 +2397,7 @@ static int list_jobs(int argc, char *argv[], void *userdata) {
|
||||
static int cancel_job(int argc, char *argv[], void *userdata) {
|
||||
sd_bus *bus;
|
||||
char **name;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
if (argc <= 1)
|
||||
return trivial_method(argc, argv, userdata);
|
||||
@ -6973,7 +6973,7 @@ static int add_dependency(int argc, char *argv[], void *userdata) {
|
||||
UnitFileChange *changes = NULL;
|
||||
size_t n_changes = 0;
|
||||
UnitDependency dep;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
if (!argv[1])
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user