Browse Source

ubox: Replace { 0 } with {}.

The latter is more compatible with older GCC versions like 4.9. Additionally, initializing with { 0 } produces a warning that only the first field was initialized.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Rosen Penev 6 years ago
parent
commit
dd61c9f1c6
2 changed files with 2 additions and 2 deletions
  1. 1 1
      log/logd.c
  2. 1 1
      validate/cli.c

+ 1 - 1
log/logd.c

@@ -84,7 +84,7 @@ read_log(struct ubus_context *ctx, struct ubus_object *obj,
 		struct blob_attr *msg)
 {
 	struct client *cl;
-	struct blob_attr *tb[__READ_MAX] = { 0 };
+	struct blob_attr *tb[__READ_MAX] = {};
 	struct log_head *l;
 	int count = 0;
 	int fds[2];

+ 1 - 1
validate/cli.c

@@ -175,7 +175,7 @@ static int
 validate_option(struct uci_context *ctx, char *package, char *section, char *option)
 {
 	char *opt, *expr, *def;
-	struct uci_ptr ptr = { 0 };
+	struct uci_ptr ptr = {};
 
 	if (!parse_tuple(option, &opt, &expr, &def))
 	{