Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106951212
D38217.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38217.diff
View Options
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1889,47 +1889,41 @@
}
/*
- * Based on on sysctl_handle_int() convert microseconds to a sbintime.
+ * Based on on sysctl_handle_64() convert microseconds to a sbintime.
*/
int
sysctl_usec_to_sbintime(SYSCTL_HANDLER_ARGS)
{
int error;
- int64_t tt;
- sbintime_t sb;
+ int64_t usec;
- tt = *(int64_t *)arg1;
- sb = sbttous(tt);
+ usec = sbttous(*(sbintime_t *)arg1);
- error = sysctl_handle_64(oidp, &sb, 0, req);
+ error = sysctl_handle_64(oidp, &usec, 0, req);
if (error || !req->newptr)
return (error);
- tt = ustosbt(sb);
- *(int64_t *)arg1 = tt;
+ *(sbintime_t *)arg1 = ustosbt(usec);
return (0);
}
/*
- * Based on on sysctl_handle_int() convert milliseconds to a sbintime.
+ * Based on on sysctl_handle_64() convert milliseconds to a sbintime.
*/
int
sysctl_msec_to_sbintime(SYSCTL_HANDLER_ARGS)
{
int error;
- int64_t tt;
- sbintime_t sb;
+ int64_t msec;
- tt = *(int64_t *)arg1;
- sb = sbttoms(tt);
+ msec = sbttoms(*(sbintime_t *)arg1);
- error = sysctl_handle_64(oidp, &sb, 0, req);
+ error = sysctl_handle_64(oidp, &msec, 0, req);
if (error || !req->newptr)
return (error);
- tt = mstosbt(sb);
- *(int64_t *)arg1 = tt;
+ *(sbintime_t *)arg1 = mstosbt(msec);
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 11:30 PM (2 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15727301
Default Alt Text
D38217.diff (1 KB)
Attached To
Mode
D38217: sysctl: use correct types and names in sysctl_*sec_to_sbintime
Attached
Detach File
Event Timeline
Log In to Comment