Module Name: src
Committed By: pgoyette
Date: Thu Jan 17 21:32:42 UTC 2019
Modified Files:
src/sys/sys [pgoyette-compat]: module_hook.h
Log Message:
The return value of a hook is not necessarily an error code, so
rename the variable appropriately.
NFCI
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/sys/module_hook.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.1.2.10 src/sys/sys/module_hook.h:1.1.2.11
--- src/sys/sys/module_hook.h:1.1.2.10 Mon Jan 14 13:34:28 2019
+++ src/sys/sys/module_hook.h Thu Jan 17 21:32:42 2019
@@ -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 @@ int \
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 @@ hook ## _call decl \
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) \