Source-Changes-HG archive

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

[src/trunk]: src/sys/kern crashme(9): Fix crashme_add return value to match c...



details:   https://anonhg.NetBSD.org/src/rev/57185f1dd2a6
branches:  trunk
changeset: 370182:57185f1dd2a6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Sep 21 10:50:29 2022 +0000

description:
crashme(9): Fix crashme_add return value to match comment.

XXX Why do this and crashme_remove return -1 instead of an error code
like essentially everything else in the kernel?

diffstat:

 sys/kern/kern_crashme.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 51395d898243 -r 57185f1dd2a6 sys/kern/kern_crashme.c
--- a/sys/kern/kern_crashme.c   Wed Sep 21 10:50:11 2022 +0000
+++ b/sys/kern/kern_crashme.c   Wed Sep 21 10:50:29 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_crashme.c,v 1.8 2022/09/21 10:50:11 riastradh Exp $       */
+/*     $NetBSD: kern_crashme.c,v 1.9 2022/09/21 10:50:29 riastradh Exp $       */
 
 /*
  * Copyright (c) 2018, 2019 Matthew R. Green
@@ -134,7 +134,7 @@
        }
        mutex_exit(&crashme_lock);
 
-       return rv;
+       return rv == 0 ? 0 : -1;
 }
 
 /*



Home | Main Index | Thread Index | Old Index