Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern PR 49636 Henning Petersen: use "0L" to return 0 fro...
details: https://anonhg.NetBSD.org/src/rev/c321a9c752e1
branches: trunk
changeset: 348217:c321a9c752e1
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Oct 10 01:22:08 2016 +0000
description:
PR 49636 Henning Petersen: use "0L" to return 0 from a function returning
long, and test its returned value against "0L" instead of "0".
This is not especially necessary, but it's also harmless.
diffstat:
sys/kern/uipc_socket.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (52 lines):
diff -r 0a3bd4a6c419 -r c321a9c752e1 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Sun Oct 09 21:03:43 2016 +0000
+++ b/sys/kern/uipc_socket.c Mon Oct 10 01:22:08 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.249 2016/10/02 19:26:46 christos Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.250 2016/10/10 01:22:08 dholland Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.249 2016/10/02 19:26:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.250 2016/10/10 01:22:08 dholland Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -346,7 +346,7 @@
int i;
if (VMSPACE_IS_KERNEL_P(uio->uio_vmspace))
- return (0);
+ return 0L;
if (iov->iov_len < (size_t) space)
space = iov->iov_len;
@@ -362,13 +362,13 @@
lva = sokvaalloc(sva, len, so);
if (lva == 0)
- return 0;
+ return 0L;
error = uvm_loan(&uio->uio_vmspace->vm_map, sva, len,
m->m_ext.ext_pgs, UVM_LOAN_TOPAGE);
if (error) {
sokvafree(lva, len);
- return (0);
+ return 0L;
}
for (i = 0, va = lva; i < npgs; i++, va += PAGE_SIZE)
@@ -1008,7 +1008,7 @@
uio->uio_iov->iov_len >= sock_loan_thresh &&
space >= sock_loan_thresh &&
(len = sosend_loan(so, uio, m,
- space)) != 0) {
+ space)) != 0L) {
SOSEND_COUNTER_INCR(&sosend_loan_big);
space -= len;
goto have_data;
Home |
Main Index |
Thread Index |
Old Index