summaryrefslogtreecommitdiff
path: root/hwclock
diff options
context:
space:
mode:
authorKalev Soikonen <ksop@hot.ee>2008-07-28 02:13:53 +0300
committerKarel Zak <kzak@redhat.com>2008-08-06 12:47:55 +0200
commitd458f94a7cdf0ec9bc11518d49c8ad39d78da7c0 (patch)
tree9b7c1ef6a58b7b2ae56589ea6f05a185b37febaf /hwclock
parentf8d87ab139a948300c7c0721b1d78ab2d5e7b5a6 (diff)
downloadutil-linux-old-d458f94a7cdf0ec9bc11518d49c8ad39d78da7c0.tar.gz
hwclock: unshadow a diagnostic printf
- Bogus if test means one message is never produced. - Avoid needless passing of a global variable (debug). The --test option flag ought to be a global as well (and perhaps -n/--dry-run). Signed-off-by: Kalev Soikonen <ksop@hot.ee>
Diffstat (limited to 'hwclock')
-rw-r--r--hwclock/hwclock.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c
index 1fb00582..619ff79f 100644
--- a/hwclock/hwclock.c
+++ b/hwclock/hwclock.c
@@ -851,8 +851,7 @@ calculate_adjustment(const double factor,
const double not_adjusted,
const time_t systime,
int *adjustment_p,
- double *retro_p,
- const int debug ) {
+ double *retro_p) {
/*----------------------------------------------------------------------------
Do the drift adjustment calculation.
@@ -992,8 +991,7 @@ do_adjustment(struct adjtime *adjtime_p,
adjtime_p->last_adj_time,
adjtime_p->not_adjusted,
hclocktime,
- &adjustment, &retro,
- debug );
+ &adjustment, &retro);
if (adjustment > 0 || adjustment < -1) {
set_hardware_clock_exact(hclocktime + adjustment,
time_inc(read_time, -retro),
@@ -1512,7 +1510,7 @@ main(int argc, char **argv) {
permitted = TRUE;
else {
/* program is designed to run setuid (in some situations) */
- if (set || hctosys || systohc || adjust) {
+ if (set || systohc || adjust) {
fprintf(stderr,
_("Sorry, only the superuser can change "
"the Hardware Clock.\n"));