[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 9/9] net: Fix the indent problems
From: |
Zhang Han |
Subject: |
[PATCH 9/9] net: Fix the indent problems |
Date: |
Tue, 22 Dec 2020 16:23:40 +0800 |
Fix Suspect code indent for statements
Signed-off-by: Zhang Han <zhanghan64@huawei.com>
---
net/tap-solaris.c | 18 +++++++++---------
net/tap-win32.c | 28 ++++++++++++++--------------
net/vde.c | 2 +-
3 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index 0b4f709abc..fc1e796f70 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -76,16 +76,16 @@ static int tap_alloc(char *dev, size_t dev_size, Error
**errp)
memset(&ifr, 0x0, sizeof(ifr));
if (*dev) {
- ptr = dev;
- while (*ptr && !qemu_isdigit((int)*ptr)) {
- ptr++;
- }
- ppa = atoi(ptr);
+ ptr = dev;
+ while (*ptr && !qemu_isdigit((int)*ptr)) {
+ ptr++;
+ }
+ ppa = atoi(ptr);
}
/* Check if IP device was opened */
if (ip_fd) {
- close(ip_fd);
+ close(ip_fd);
}
TFR(ip_fd = open("/dev/udp", O_RDWR, 0));
@@ -182,9 +182,9 @@ static int tap_alloc(char *dev, size_t dev_size, Error
**errp)
ifr.lifr_arp_muxid = arp_muxid;
if (ioctl(ip_fd, SIOCSLIFMUXID, &ifr) < 0) {
- ioctl(ip_fd, I_PUNLINK , arp_muxid);
- ioctl(ip_fd, I_PUNLINK, ip_muxid);
- error_report("Can't set multiplexor id");
+ ioctl(ip_fd, I_PUNLINK , arp_muxid);
+ ioctl(ip_fd, I_PUNLINK, ip_muxid);
+ error_report("Can't set multiplexor id");
}
snprintf(dev, dev_size, "tap%d", ppa);
diff --git a/net/tap-win32.c b/net/tap-win32.c
index 107027aa24..b3af8fcba9 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -158,24 +158,24 @@ static tun_buffer_t
*get_buffer_from_output_queue(tap_win32_overlapped_t *const
result = WaitForSingleObject(overlapped->output_queue_semaphore, timeout);
switch (result) {
- /* The semaphore object was signaled. */
- case WAIT_OBJECT_0:
- EnterCriticalSection(&overlapped->output_queue_cs);
+ /* The semaphore object was signaled. */
+ case WAIT_OBJECT_0:
+ EnterCriticalSection(&overlapped->output_queue_cs);
- buffer = overlapped->output_queue_front;
- overlapped->output_queue_front = buffer->next;
+ buffer = overlapped->output_queue_front;
+ overlapped->output_queue_front = buffer->next;
- if (overlapped->output_queue_front == NULL) {
- overlapped->output_queue_back = NULL;
- }
+ if (overlapped->output_queue_front == NULL) {
+ overlapped->output_queue_back = NULL;
+ }
- LeaveCriticalSection(&overlapped->output_queue_cs);
- break;
+ LeaveCriticalSection(&overlapped->output_queue_cs);
+ break;
- /* Semaphore was nonsignaled, so a time-out occurred. */
- case WAIT_TIMEOUT:
- /* Cannot open another window. */
- break;
+ /* Semaphore was nonsignaled, so a time-out occurred. */
+ case WAIT_TIMEOUT:
+ /* Cannot open another window. */
+ break;
}
return buffer;
diff --git a/net/vde.c b/net/vde.c
index 0b06464f4d..9ccedddc63 100644
--- a/net/vde.c
+++ b/net/vde.c
@@ -55,7 +55,7 @@ static ssize_t vde_receive(NetClientState *nc, const uint8_t
*buf, size_t size)
ssize_t ret;
do {
- ret = vde_send(s->vde, (const char *)buf, size, 0);
+ ret = vde_send(s->vde, (const char *)buf, size, 0);
} while (ret < 0 && errno == EINTR);
return ret;
--
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 <=
- [PATCH 8/9] net: Remove initialization of static ints, Zhang Han, 2020/12/22
- [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