]> rtime.felk.cvut.cz Git - frescor/fosa.git/blobdiff - src_aquosa/fosa_clocks_and_timers.c
Bugfixes and restyling.
[frescor/fosa.git] / src_aquosa / fosa_clocks_and_timers.c
index 9dae54c7ea6777781acbacac061c55f6a396bd4f..5adb0d6ba9fd8a29f25ed68bb01507e3f7d3e089 100644 (file)
@@ -231,7 +231,7 @@ int fosa_timer_delete(fosa_timer_id_t  timerid)
  * notify it to the system console and then terminate the FRSH
  * implementation and dependant applications
  **/
-int fosa_rel_timer_arm (fosa_timer_id_t timerid, const fosa_rel_time_t *value)
+int fosa_rel_timer_arm(fosa_timer_id_t timerid, const fosa_rel_time_t *value)
 {
        struct itimerspec when;
 
@@ -274,8 +274,8 @@ int fosa_abs_timer_arm(fosa_timer_id_t timerid, const fosa_abs_time_t *value)
        struct itimerspec when;
 
        /* non-periodic one shot timer */
-       when.it_value= fosa_abs_time_to_timespec(*value);
-       when.it_interval=zero_time;
+       when.it_value = fosa_abs_time_to_timespec(*value);
+       when.it_interval = zero_time;
 
        return timer_settime(timerid, TIMER_ABSTIME, &when, NULL);
 }
@@ -300,7 +300,7 @@ int fosa_timer_get_remaining_time(fosa_timer_id_t timerid,
        int ret;
        struct itimerspec time;
 
-       if (remaining_time == NULL)
+       if (!remaining_time)
                return FOSA_EINVAL;
 
        ret = timer_gettime(timerid, &time);
@@ -331,7 +331,7 @@ int fosa_timer_disarm(fosa_timer_id_t timerid,
        int ret;
        struct itimerspec time;
 
-       if (remaining_time == NULL)
+       if (!remaining_time)
                return FOSA_EINVAL;
 
        ret = timer_gettime(timerid, &time);