summaryrefslogtreecommitdiff
path: root/core/opiealarm/opiealarm.c
Unidiff
Diffstat (limited to 'core/opiealarm/opiealarm.c') (more/less context) (show whitespace changes)
-rw-r--r--core/opiealarm/opiealarm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/opiealarm/opiealarm.c b/core/opiealarm/opiealarm.c
index 998cabd..90a743f 100644
--- a/core/opiealarm/opiealarm.c
+++ b/core/opiealarm/opiealarm.c
@@ -92,8 +92,9 @@ int fork_with_pidfile ( void )
92 else if ( pid < 0 ) { 92 else if ( pid < 0 ) {
93 perror ( "forking failed" ); 93 perror ( "forking failed" );
94 return 0; 94 return 0;
95 } 95 }
96 //sleep( 60 );
96 97
97 // child process needs to react to SIGUSR2. This is sent when 98 // child process needs to react to SIGUSR2. This is sent when
98 // a new opiealarm process is started. 99 // a new opiealarm process is started.
99 100
@@ -205,9 +206,9 @@ int main ( int argc, char **argv )
205 206
206 207
207int suspend ( int fix_rtc ) 208int suspend ( int fix_rtc )
208{ 209{
209 FILE *fp; 210 FILE *fp = NULL;
210 char buf [64]; 211 char buf [64];
211 time_t alrt, syst, rtct; 212 time_t alrt, syst, rtct;
212 struct tm alr, sys, rtc; 213 struct tm alr, sys, rtc;
213 int fd; 214 int fd;
@@ -257,9 +258,9 @@ int suspend ( int fix_rtc )
257 if ( !fgets ( buf, sizeof( buf ) - 1, fp )) 258 if ( !fgets ( buf, sizeof( buf ) - 1, fp ))
258 break; // ( 1, TIMEFILE ); 259 break; // ( 1, TIMEFILE );
259 260
260 fclose ( fp ); 261 fclose ( fp );
261 fp = 0; 262 fp = NULL;
262 263
263 alrt = atoi ( buf ); // get the alarm time 264 alrt = atoi ( buf ); // get the alarm time
264 265
265 if ( alrt == 0 ) 266 if ( alrt == 0 )