diff options
author | Mirko Vogt <dev@nanl.de> | 2010-06-21 20:23:14 +0200 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2010-06-21 11:28:07 -0700 |
commit | ef487a35f428da6240003dca23b9d29908e2285e (patch) | |
tree | d6c73a4f831fc6ca26dfd7fef2a60041e3cd54ff /libpthread/nptl/sysdeps/unix/sysv/linux | |
parent | 6306cfe1713ad02c9c3d4b7940191bc95d27b14f (diff) |
avoid using c99 syntax
Signed-off-by: Mirko Vogt <dev@nanl.de>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux')
3 files changed, 6 insertions, 3 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c index 2ec2f3d74..01fd0312b 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c @@ -38,7 +38,8 @@ pthread_attr_getaffinity_np(const pthread_attr_t *attr, size_t cpusetsize, { /* Check whether there are any bits set beyond the limits the user requested. */ - for (size_t cnt = cpusetsize; cnt < iattr->cpusetsize; ++cnt) + size_t cnt; + for (cnt = cpusetsize; cnt < iattr->cpusetsize; ++cnt) if (((char *) iattr->cpuset)[cnt] != 0) return EINVAL; diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c index 609ee2ad1..744d55af6 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c @@ -57,7 +57,8 @@ pthread_attr_setaffinity_np (pthread_attr_t *attr, size_t cpusetsize, /* Check whether the new bitmask has any bit set beyond the last one the kernel accepts. */ - for (size_t cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) + size_t cnt; + for (cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) if (((char *) cpuset)[cnt] != '\0') /* Found a nonzero byte. This means the user request cannot be fulfilled. */ diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c index 467e8ec70..73a21ed42 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c @@ -71,7 +71,8 @@ pthread_setaffinity_np (pthread_t th, size_t cpusetsize, /* We now know the size of the kernel cpumask_t. Make sure the user does not request to set a bit beyond that. */ - for (size_t cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) + size_t cnt; + for (cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) if (((char *) cpuset)[cnt] != '\0') /* Found a nonzero byte. This means the user request cannot be fulfilled. */ |