]> sourceware.org Git - newlib-cygwin.git/commitdiff
* timer.cc (getitimer): Check that ovalue is a valid pointer, not just NULL.
authorChristopher Faylor <me@cgf.cx>
Mon, 28 Mar 2005 21:51:55 +0000 (21:51 +0000)
committerChristopher Faylor <me@cgf.cx>
Mon, 28 Mar 2005 21:51:55 +0000 (21:51 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/timer.cc

index 6015c4251d016d9b5ec3233c8f4b366a4d60aa78..631e6d322a22bb04573096cdc1ed0d57240b0d3a 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-28  Christopher Faylor  <cgf@timesys.com>
+
+       * timer.cc (getitimer): Check that ovalue is a valid pointer, not just
+       NULL.
+
 2005-03-28  Christopher Faylor  <cgf@timesys.com>
 
        * timer.cc (timer_tracker::settime): Set times to zero when just
index 746362779386283e27db7540b702c96adf32b2f6..8815cdc630adfdc5cfaa256b93bfdc75fd998743 100644 (file)
@@ -386,11 +386,8 @@ getitimer (int which, struct itimerval *ovalue)
       set_errno (EINVAL);
       return -1;
     }
-  if (ovalue == NULL)
-    {
-      set_errno (EFAULT);
-      return -1;
-    }
+  if (check_null_invalid_struct_errno (ovalue))
+    return -1;
   struct itimerspec spec_ovalue;
   int ret = timer_gettime ((timer_t) &ttstart, &spec_ovalue);
   if (!ret)
This page took 0.035832 seconds and 5 git commands to generate.