From nobody Mon Feb 9 22:38:18 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1608645456; cv=none; d=zohomail.com; s=zohoarc; b=RfUHwZFl42o+yX33oiXT3ukGM7ZLmHtIAHTLx33PSBn6Xn+5c7bYV0hi+rkXgQlDbzntQCMreIYAdEGWvz05977PFskh4BOQrHVb5TRYYedFyS+eF3hMcWI+HMgZ57QuldNTvF/8dfMajoSUsU7eHJQIOeZuCv8S/N1mhj9UtlI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608645456; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3pwacu8raS+KEBOsBOh8tyBP3hAikWhyvf6jXW2kUTs=; b=dS4/Vxx/tBI30Krw95urRjyUg8yVsKVMmNyb6pJcbK4C6iwz7FLPLHKTUW9/47irtEcsbyb8cj8cb0rsFfQdeInXVmrTv4LQ2uCTa7W+g3HZV4L+0i1xZDrpasGQNg2zvNfKJ9Yero0TM9yz0sUlhPgwc4Oax0yu1t9b3FAmGVc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608645456948313.87596302281634; Tue, 22 Dec 2020 05:57:36 -0800 (PST) Received: from localhost ([::1]:59412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kriAQ-0002Ww-BB for importer@patchew.org; Tue, 22 Dec 2020 08:57:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krdBV-0001ie-8y; Tue, 22 Dec 2020 03:38:21 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:2622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krdBS-0002cV-Kj; Tue, 22 Dec 2020 03:38:21 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4D0V7y6D8zz7Jcj; Tue, 22 Dec 2020 16:37:18 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Tue, 22 Dec 2020 16:37:53 +0800 From: Zhang Han To: Subject: [PATCH 5/9] net: Fix lines over 90 characters Date: Tue, 22 Dec 2020 16:23:36 +0800 Message-ID: <20201222082340.67405-6-zhanghan64@huawei.com> X-Mailer: git-send-email 2.29.1.59.gf9b6481aed In-Reply-To: <20201222082340.67405-1-zhanghan64@huawei.com> References: <20201222082340.67405-1-zhanghan64@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.35; envelope-from=zhanghan64@huawei.com; helo=szxga07-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 22 Dec 2020 08:55:42 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.chen@huawei.com, hunongda@huawei.com, qemu-trivial@nongnu.org, hang.zhanghailiang@huawei.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Fix the line width of code. Signed-off-by: Zhang Han --- net/socket.c | 11 +++++++---- net/tap-win32.c | 39 ++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/net/socket.c b/net/socket.c index 61671e41e3..0093ed2794 100644 --- a/net/socket.c +++ b/net/socket.c @@ -113,7 +113,9 @@ static ssize_t net_socket_receive(NetClientState *nc, c= onst uint8_t *buf, size_t return size; } =20 -static ssize_t net_socket_receive_dgram(NetClientState *nc, const uint8_t = *buf, size_t size) +static ssize_t net_socket_receive_dgram(NetClientState *nc, + const uint8_t *buf, + size_t size) { NetSocketState *s =3D DO_UPCAST(NetSocketState, nc, nc); ssize_t ret; @@ -353,9 +355,10 @@ static NetSocketState *net_socket_fd_init_dgram(NetCli= entState *peer, sa_type =3D sa->type; qapi_free_SocketAddress(sa); =20 - /* fd passed: multicast: "learn" dgram_dst address from bound address = and save it - * Because this may be "shared" socket from a "master" process, datagr= ams would be recv() - * by ONLY ONE process: we must "clone" this dgram socket --jjo + /* fd passed: multicast: "learn" dgram_dst address from bound address + * and save it. Because this may be "shared" socket from a "master" pr= ocess, + * datagrams would be recv() by ONLY ONE process: we must "clone" + * this dgram socket --jjo */ =20 if (is_connected && mcast !=3D NULL) { diff --git a/net/tap-win32.c b/net/tap-win32.c index ac139e9ec9..107027aa24 100644 --- a/net/tap-win32.c +++ b/net/tap-win32.c @@ -63,9 +63,11 @@ * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 -#define ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-= E325-11CE-BFC1-08002BE10318}" +#define ADAPTER_KEY \ + "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-0= 8002BE10318}" =20 -#define NETWORK_CONNECTIONS_KEY "SYSTEM\\CurrentControlSet\\Control\\Netwo= rk\\{4D36E972-E325-11CE-BFC1-08002BE10318}" +#define NETWORK_CONNECTIONS_KEY \ + "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1= -08002BE10318}" =20 /* * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -136,7 +138,8 @@ static tun_buffer_t *get_buffer_from_free_list(tap_win3= 2_overlapped_t *const ove return buffer; } =20 -static void put_buffer_on_free_list(tap_win32_overlapped_t *const overlapp= ed, tun_buffer_t *const buffer) +static void put_buffer_on_free_list(tap_win32_overlapped_t *const overlapp= ed, + tun_buffer_t *const buffer) { EnterCriticalSection(&overlapped->free_list_cs); buffer->next =3D overlapped->free_list; @@ -145,7 +148,8 @@ static void put_buffer_on_free_list(tap_win32_overlappe= d_t *const overlapped, tu ReleaseSemaphore(overlapped->free_list_semaphore, 1, NULL); } =20 -static tun_buffer_t *get_buffer_from_output_queue(tap_win32_overlapped_t *= const overlapped, const int block) +static tun_buffer_t *get_buffer_from_output_queue(tap_win32_overlapped_t *= const overlapped, + const int block) { tun_buffer_t *buffer =3D NULL; DWORD result, timeout =3D block ? INFINITE : 0L; @@ -182,7 +186,8 @@ static tun_buffer_t *get_buffer_from_output_queue_immed= iate(tap_win32_overlapped return get_buffer_from_output_queue(overlapped, 0); } =20 -static void put_buffer_on_output_queue(tap_win32_overlapped_t *const overl= apped, tun_buffer_t *const buffer) +static void put_buffer_on_output_queue(tap_win32_overlapped_t *const overl= apped, + tun_buffer_t *const buffer) { EnterCriticalSection(&overlapped->output_queue_cs); =20 @@ -194,7 +199,7 @@ static void put_buffer_on_output_queue(tap_win32_overla= pped_t *const overlapped, overlapped->output_queue_back =3D buffer; } =20 - LeaveCriticalSection(&overlapped->output_queue_cs); + LeaveCriticalSection(&overlapped->ou412tput_queue_cs); =20 ReleaseSemaphore(overlapped->output_queue_semaphore, 1, NULL); } @@ -409,7 +414,8 @@ static int tap_win32_set_status(HANDLE handle, int stat= us) &status, sizeof(status), &len, NULL); } =20 -static void tap_win32_overlapped_init(tap_win32_overlapped_t *const overla= pped, const HANDLE handle) +static void tap_win32_overlapped_init(tap_win32_overlapped_t *const overla= pped, + const HANDLE handle) { overlapped->handle =3D handle; =20 @@ -447,7 +453,9 @@ static void tap_win32_overlapped_init(tap_win32_overlap= ped_t *const overlapped, fprintf(stderr, "error creating free list semaphore!\n"); } =20 - overlapped->free_list =3D overlapped->output_queue_front =3D overlappe= d->output_queue_back =3D NULL; + overlapped->free_list =3D overlapped->output_queue_front =3D + overlapped->output_queue_back =3D + NULL; =20 { unsigned index; @@ -537,16 +545,20 @@ static DWORD WINAPI tap_win32_thread_entry(LPVOID par= am) dwError =3D GetLastError(); if (dwError =3D=3D ERROR_IO_PENDING) { WaitForSingleObject(overlapped->read_event, INFINITE); - result =3D GetOverlappedResult(overlapped->handle, &overla= pped->read_overlapped, + result =3D GetOverlappedResult(overlapped->handle, + &overlapped->read_overlapped, &read_size, FALSE); if (!result) { #ifdef DEBUG_TAP_WIN32 LPVOID lpBuffer; dwError =3D GetLastError(); - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_= MESSAGE_FROM_SYSTEM, - NULL, dwError, MAKELANGID(LANG_NEUTRAL,= SUBLANG_DEFAULT), + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, dwError, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAUL= T), (LPTSTR) &lpBuffer, 0, NULL); - fprintf(stderr, "Tap-Win32: Error GetOverlappedResult = %d - %s\n", dwError, lpBuffer); + fprintf(stderr, "Tap-Win32: Error GetOverlappedResult = %d - %s\n", + dwError, lpBuffer); LocalFree(lpBuffer); #endif } @@ -619,7 +631,8 @@ static int tap_win32_open(tap_win32_overlapped_t **phan= dle, snprintf(name_buffer, sizeof(name_buffer), "%s", preferred_name); } =20 - rc =3D get_device_guid(device_guid, sizeof(device_guid), name_buffer, = sizeof(name_buffer)); + rc =3D get_device_guid(device_guid, sizeof(device_guid), + name_buffer, sizeof(name_buffer)); if (rc) { return -1; } --=20 2.29.1.59.gf9b6481aed