浏览代码

test/nptl: don't use c99 features if you don't need to

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley 15 年之前
父节点
当前提交
6b4b650e05
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      test/nptl/tst-cancel22.c

+ 2 - 1
test/nptl/tst-cancel22.c

@@ -29,6 +29,7 @@ int seen;
 static void *
 tf (void *arg)
 {
+  int i;
   int old;
   int r = pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &old);
   if (r != 0)
@@ -44,7 +45,7 @@ tf (void *arg)
       exit (1);
     }
 
-  for (int i = 0; i < 10; ++i)
+  for (i = 0; i < 10; ++i)
     {
       struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 };
       TEMP_FAILURE_RETRY (nanosleep (&ts, &ts));