[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/9] net: Remove initialization of static ints
From: |
Zhang Han |
Subject: |
[PATCH 8/9] net: Remove initialization of static ints |
Date: |
Tue, 22 Dec 2020 16:23:39 +0800 |
Do not initialise statics to 0 or NULL
Signed-off-by: Zhang Han <zhanghan64@huawei.com>
---
net/tap-solaris.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index d5af4efd60..0b4f709abc 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -63,10 +63,10 @@ static int tap_alloc(char *dev, size_t dev_size, Error
**errp)
/* FIXME leaks like a sieve on error paths */
/* FIXME suspicious: many errors are reported, then ignored */
int tap_fd, if_fd, ppa = -1;
- static int ip_fd = 0;
+ static int ip_fd;
char *ptr;
- static int arp_fd = 0;
+ static int arp_fd;
int ip_muxid, arp_muxid;
struct strioctl strioc_if, strioc_ppa;
int link_type = I_PLINK;
--
2.29.1.59.gf9b6481aed
- [PATCH 0/9] Fix some style problems in net, Zhang Han, 2020/12/22
- [PATCH 9/9] net: Fix the indent problems, Zhang Han, 2020/12/22
- [PATCH 8/9] net: Remove initialization of static ints,
Zhang Han <=
- [PATCH 5/9] net: Fix lines over 90 characters, Zhang Han, 2020/12/22
- [PATCH 1/9] net: Add spaces around operator/delete redundant spaces, Zhang Han, 2020/12/22
- [PATCH 4/9] net: Transfer "foo* " to "foo *", Zhang Han, 2020/12/22
- [PATCH 7/9] net: Remove assignment in if condition, Zhang Han, 2020/12/22
- [PATCH 3/9] net: Transfer // comments to /**/, Zhang Han, 2020/12/22
- [PATCH 6/9] net: Transfer tabs to spcaes, Zhang Han, 2020/12/22
- [PATCH 2/9] net: Add braces for statements/fix braces' position, Zhang Han, 2020/12/22
- Re: [PATCH 0/9] Fix some style problems in net, no-reply, 2020/12/22