Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src/sys/sys The return value of a hook is not necessar...
details: https://anonhg.NetBSD.org/src/rev/cd304a65cae6
branches: pgoyette-compat
changeset: 447590:cd304a65cae6
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Thu Jan 17 21:32:42 2019 +0000
description:
The return value of a hook is not necessarily an error code, so
rename the variable appropriately.
NFCI
diffstat:
sys/sys/module_hook.h | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r 298a8d808b52 -r cd304a65cae6 sys/sys/module_hook.h
--- a/sys/sys/module_hook.h Tue Jan 15 22:28:15 2019 +0000
+++ b/sys/sys/module_hook.h Thu Jan 17 21:32:42 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.1.2.10 2019/01/14 13:34:28 pgoyette Exp $ */
+/* $NetBSD: module_hook.h,v 1.1.2.11 2019/01/17 21:32:42 pgoyette Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -117,7 +117,7 @@
hook ## _call decl \
{ \
bool __hooked; \
- int __hook_error, __hook_s; \
+ int __hook_retval, __hook_s; \
\
__hook_s = pserialize_read_enter(); \
__hooked = hook.hooked; \
@@ -128,13 +128,13 @@
pserialize_read_exit(__hook_s); \
\
if (__hooked) { \
- __hook_error = (*hook.f)args; \
+ __hook_retval = (*hook.f)args; \
localcount_release(&hook.lc, &hook.cv, \
&hook.mtx); \
} else { \
- __hook_error = default; \
+ __hook_retval = default; \
} \
- return __hook_error; \
+ return __hook_retval; \
}
#define MODULE_CALL_VOID_HOOK(hook, decl, args, default) \
Home |
Main Index |
Thread Index |
Old Index