RTC: Fix some errors when RTC debug is enabled

This commit is contained in:
Gregory Nutt
2016-04-03 09:52:25 -06:00
parent 1135ce804d
commit ae95f6cdfd
2 changed files with 5 additions and 5 deletions
+1 -1
Submodule arch updated: 68a1918ab4...c71c24971d
+4 -4
View File
@@ -175,7 +175,7 @@ static void rtc_alarm_callback(FAR void *priv, int alarmid)
FAR struct rtc_upperhalf_s *upper = (FAR struct rtc_upperhalf_s *)priv;
FAR struct rtc_alarminfo_s *alarminfo;
DEBUGASSERT(upper != NULL && id >=0 && ID < CONFIG_RTC_NALARMS);
DEBUGASSERT(upper != NULL && alarmid >= 0 && alarmid < CONFIG_RTC_NALARMS);
alarminfo = &upper->alarminfo[alarmid];
/* Do we think that the alaram is active? It might be due to some
@@ -365,7 +365,7 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
DEBUGASSERT(alarminfo != NULL);
alarmid = alarminfo->id;
DEBUGASSERT(alarmid >= 0 && alarmid < RTC_NALARMS);
DEBUGASSERT(alarmid >= 0 && alarmid < CONFIG_RTC_NALARMS);
/* Is the alarm active? */
@@ -428,7 +428,7 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
DEBUGASSERT(alarminfo != NULL);
alarmid = alarminfo->id;
DEBUGASSERT(alarmid >= 0 && alarmid < RTC_NALARMS);
DEBUGASSERT(alarmid >= 0 && alarmid < CONFIG_RTC_NALARMS);
/* Is the alarm active? */
@@ -484,7 +484,7 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
int alarmid = (int)arg;
DEBUGASSERT(alarmid >= 0 && alarmid < RTC_NALARMS);
DEBUGASSERT(alarmid >= 0 && alarmid < CONFIG_RTC_NALARMS);
if (ops->cancelalarm)
{
ret = ops->cancelalarm(upper->lower, alarmid);