]> granicus.if.org Git - check/commitdiff
Change name 'new' to something else
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Mon, 23 Jun 2014 04:13:55 +0000 (04:13 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Mon, 23 Jun 2014 04:13:55 +0000 (04:13 +0000)
Change necessary for compiling on c++ compiler, as
'new' is a reserved name.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1170 64e312b2-a51f-0410-8e61-82d0ca0eb02a

lib/timer_delete.c
lib/timer_settime.c

index 189fe4cf4c360a74d54f193577cdfaab0d5ed29c..ef388333a01da9e87eaf0b3e3efe38803c2fca6a 100644 (file)
@@ -7,17 +7,17 @@ int timer_delete(timer_t timerid CK_ATTRIBUTE_UNUSED)
      * If the system does not have timer_settime() but does have
      * setitimer() use that instead of alarm().
      */
-    struct itimerval new;
+    struct itimerval interval;
 
     /*
      * Setting values to '0' results in disabling the running timer.
      */
-    new.it_value.tv_sec = 0;
-    new.it_value.tv_usec = 0;
-    new.it_interval.tv_sec = 0;
-    new.it_interval.tv_usec = 0;
+    interval.it_value.tv_sec = 0;
+    interval.it_value.tv_usec = 0;
+    interval.it_interval.tv_sec = 0;
+    interval.it_interval.tv_usec = 0;
 
-    return setitimer(ITIMER_REAL, &new, NULL);
+    return setitimer(ITIMER_REAL, &interval, NULL);
 #else
     /*
      * There is only one timer, that used by alarm.
index 479838b9152d0da98437841a2fae7b4c5f8593d7..d3b5aba64c286a1fecc670999747e34279095390 100644 (file)
@@ -10,14 +10,14 @@ int timer_settime(timer_t timerid CK_ATTRIBUTE_UNUSED,
      * If the system does not have timer_settime() but does have
      * setitimer() use that instead of alarm().
      */
-    struct itimerval new;
+    struct itimerval interval;
 
-    new.it_value.tv_sec = new_value->it_value.tv_sec;
-    new.it_value.tv_usec = new_value->it_value.tv_nsec / 1000;
-    new.it_interval.tv_sec = new_value->it_interval.tv_sec;
-    new.it_interval.tv_usec = new_value->it_interval.tv_nsec / 1000;
+    interval.it_value.tv_sec = new_value->it_value.tv_sec;
+    interval.it_value.tv_usec = new_value->it_value.tv_nsec / 1000;
+    interval.it_interval.tv_sec = new_value->it_interval.tv_sec;
+    interval.it_interval.tv_usec = new_value->it_interval.tv_nsec / 1000;
 
-    return setitimer(ITIMER_REAL, &new, NULL);
+    return setitimer(ITIMER_REAL, &interval, NULL);
 #else
     int seconds = new_value->it_value.tv_sec;