mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtcm: prevent to use NULL
as a Tick type
Tick (aka time_t) shall be an integer type, not a pointer. Change to use `0` instead of `NULL`.
This commit is contained in:
parent
4316bb797d
commit
16eb6092b0
5 changed files with 14 additions and 14 deletions
|
@ -81,12 +81,12 @@ ClosestTick(
|
|||
real_start_time,
|
||||
target_time = _target_time;
|
||||
|
||||
if (!re) return (Tick)NULL;
|
||||
if (!re) return (Tick)0;
|
||||
|
||||
FillInRepeatEvent(start_time, re);
|
||||
|
||||
if (!(*res = InitRepeatEventState(re)))
|
||||
return (Tick)NULL;
|
||||
return (Tick)0;
|
||||
|
||||
if (target_time < start_time)
|
||||
target_time = start_time;
|
||||
|
@ -131,7 +131,7 @@ ClosestTick(
|
|||
(re->re_end_date && re->re_end_date < closest_tick)) {
|
||||
free (*res);
|
||||
*res = NULL;
|
||||
return (Tick)NULL;
|
||||
return (Tick)0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -351,7 +351,7 @@ DoWeek(
|
|||
/* Make sure the start time is on the first real event slot. */
|
||||
if (_target_time) {
|
||||
if (!(unused = InitRepeatEventState(re)))
|
||||
return (Tick)NULL;
|
||||
return (Tick)0;
|
||||
start_time = DoWeek(0, _start_time, re, unused);
|
||||
free(unused);
|
||||
if (_target_time < start_time)
|
||||
|
@ -676,7 +676,7 @@ DoYearByMonth(
|
|||
/* Make sure the start time is on the first real event slot. */
|
||||
if (_target_time) {
|
||||
if (!(unused = InitRepeatEventState(re)))
|
||||
return (Tick)NULL;
|
||||
return (Tick)0;
|
||||
start_time = DoYearByMonth(0, _start_time, re, unused);
|
||||
free(unused);
|
||||
if (_target_time < start_time)
|
||||
|
@ -780,7 +780,7 @@ DoYearByDay(
|
|||
/* Make sure the start time is on the first real event slot. */
|
||||
if (_target_time) {
|
||||
if (!(unused = InitRepeatEventState(re)))
|
||||
return (Tick)NULL;
|
||||
return (Tick)0;
|
||||
start_time = DoYearByDay(0, _start_time, re, unused);
|
||||
free(unused);
|
||||
if (_target_time < start_time)
|
||||
|
|
|
@ -63,7 +63,7 @@ LastTick(
|
|||
{
|
||||
Tick last_time;
|
||||
|
||||
if (!re) return (Tick)NULL;
|
||||
if (!re) return (Tick)0;
|
||||
|
||||
if (re->re_duration == RE_INFINITY) return EOT;
|
||||
|
||||
|
@ -101,7 +101,7 @@ DoMinute(
|
|||
const Tick start_time,
|
||||
const RepeatEvent *re)
|
||||
{
|
||||
return (Tick)NULL;
|
||||
return (Tick)0;
|
||||
}
|
||||
|
||||
static Tick
|
||||
|
@ -404,7 +404,7 @@ DoYearByMonth(
|
|||
}
|
||||
}
|
||||
/* No months have a day that can be used */
|
||||
return ((Tick)NULL);
|
||||
return (Tick)0;
|
||||
}
|
||||
|
||||
last_time2 = mktime(start_tm);
|
||||
|
|
|
@ -79,7 +79,7 @@ NextTick(
|
|||
{
|
||||
Tick next_time;
|
||||
|
||||
if (!re) return (Tick)NULL;
|
||||
if (!re) return (Tick)0;
|
||||
|
||||
FillInRepeatEvent(start_time, re);
|
||||
|
||||
|
@ -126,7 +126,7 @@ DoMinute(
|
|||
const RepeatEvent *re,
|
||||
RepeatEventState *res)
|
||||
{
|
||||
return (Tick)NULL;
|
||||
return (Tick)0;
|
||||
}
|
||||
|
||||
static Tick
|
||||
|
|
|
@ -92,7 +92,7 @@ PrevTick(
|
|||
Tick next_time;
|
||||
Tick _start_time;
|
||||
|
||||
if (!re) return (Tick)NULL;
|
||||
if (!re) return (Tick)0;
|
||||
|
||||
if (!start_time)
|
||||
FillInRepeatEvent(cur_time, re);
|
||||
|
@ -148,7 +148,7 @@ DoMinute(
|
|||
const RepeatEvent *re,
|
||||
RepeatEventState *res)
|
||||
{
|
||||
return (Tick)NULL;
|
||||
return (Tick)0;
|
||||
}
|
||||
|
||||
static Tick
|
||||
|
|
|
@ -230,7 +230,7 @@ WeekNumberToDay(
|
|||
* month.
|
||||
*/
|
||||
if (date_tm->tm_mon != initial_month_number)
|
||||
return ((Tick)NULL);
|
||||
return (Tick)0;
|
||||
|
||||
return (_date);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue