Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Fix a return value of rt_update_prepare



details:   https://anonhg.NetBSD.org/src/rev/5496a14eddd6
branches:  trunk
changeset: 358936:5496a14eddd6
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue Jan 23 07:20:10 2018 +0000

description:
Fix a return value of rt_update_prepare

Callers expect it to be an errno.

diffstat:

 sys/net/route.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 67348aa01cb0 -r 5496a14eddd6 sys/net/route.c
--- a/sys/net/route.c   Tue Jan 23 07:15:04 2018 +0000
+++ b/sys/net/route.c   Tue Jan 23 07:20:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.204 2018/01/19 08:01:05 ozaki-r Exp $      */
+/*     $NetBSD: route.c,v 1.205 2018/01/23 07:20:10 ozaki-r Exp $      */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.204 2018/01/19 08:01:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.205 2018/01/23 07:20:10 ozaki-r Exp $");
 
 #include <sys/param.h>
 #ifdef RTFLUSH_DEBUG
@@ -747,7 +747,7 @@
        /* If the entry is being destroyed, don't proceed the update. */
        if (!ISSET(rt->rt_flags, RTF_UP)) {
                RT_UNLOCK();
-               return -1;
+               return ESRCH;
        }
        rt->rt_flags |= RTF_UPDATING;
        RT_UNLOCK();



Home | Main Index | Thread Index | Old Index