summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/randomdev.h
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-03-03 19:44:22 +0000
committermarkm <markm@FreeBSD.org>2002-03-03 19:44:22 +0000
commit1b3c28870721b86193d5d4048cff88d634f3f42f (patch)
tree24e2d1fcb04c65adc9cb948dfed4b2a10ffe1d1b /sys/dev/random/randomdev.h
parentecb7a599ead8acbc1c3097067da4cc78082f0274 (diff)
downloadFreeBSD-src-1b3c28870721b86193d5d4048cff88d634f3f42f.zip
FreeBSD-src-1b3c28870721b86193d5d4048cff88d634f3f42f.tar.gz
Massive lint-inspired cleanup.
Remove unneeded includes. Deal with unused function arguments. Resolve a boatload of signed/unsigned imcompatabilities. Etc.
Diffstat (limited to 'sys/dev/random/randomdev.h')
-rw-r--r--sys/dev/random/randomdev.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/random/randomdev.h b/sys/dev/random/randomdev.h
index 80a61ba..359dc26 100644
--- a/sys/dev/random/randomdev.h
+++ b/sys/dev/random/randomdev.h
@@ -58,14 +58,14 @@ struct harvest {
void random_init(void);
void random_deinit(void);
-void random_init_harvester(void (*)(u_int64_t, void *, u_int, u_int, u_int, enum esource), u_int (*)(void *, u_int));
+void random_init_harvester(void (*)(u_int64_t, void *, u_int, u_int, u_int, enum esource), int (*)(void *, int));
void random_deinit_harvester(void);
void random_set_wakeup_exit(void *);
void random_process_event(struct harvest *event);
void random_reseed(void);
void random_unblock(void);
-u_int read_random_real(void *, u_int);
+int read_random_real(void *, int);
/* If this was c++, this would be a template */
#define RANDOM_CHECK_UINT(name, min, max) \
@@ -73,10 +73,10 @@ static int \
random_check_uint_##name(SYSCTL_HANDLER_ARGS) \
{ \
if (oidp->oid_arg1 != NULL) { \
- if (*(u_int *)(oidp->oid_arg1) < min) \
- *(u_int *)(oidp->oid_arg1) = min; \
- else if (*(u_int *)(oidp->oid_arg1) > max) \
- *(u_int *)(oidp->oid_arg1) = max; \
+ if (*(u_int *)(oidp->oid_arg1) <= (min)) \
+ *(u_int *)(oidp->oid_arg1) = (min); \
+ else if (*(u_int *)(oidp->oid_arg1) > (max)) \
+ *(u_int *)(oidp->oid_arg1) = (max); \
} \
return sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, \
req); \
OpenPOWER on IntegriCloud