"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-get.c" between
stress-ng-0.13.04.tar.xz and stress-ng-0.13.05.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

stress-get.c  (stress-ng-0.13.04.tar.xz):stress-get.c  (stress-ng-0.13.05.tar.xz)
skipping to change at line 303 skipping to change at line 303
args->name, errno, strerror(errno)); args->name, errno, strerror(errno));
/* /*
* Exercise invalid getgroups calls * Exercise invalid getgroups calls
*/ */
ret = getgroups(1, gids); ret = getgroups(1, gids);
(void)ret; (void)ret;
#if defined(__NR_getgroups) #if defined(__NR_getgroups)
/* /*
* libc may detect a -ve gidsetsize argument and not call * libc may detect a -ve gidsetsize argument and not call
* the system call. Override this by directly calling the * the system call. Override this by directly calling the
* system call if possible * system call if possible. Memset gids to zero to keep
* valgrind happy.
*/ */
(void)memset(gids, 0, sizeof(gids));
ret = (int)syscall(__NR_getgroups, -1, gids); ret = (int)syscall(__NR_getgroups, -1, gids);
(void)ret; (void)ret;
#endif #endif
if (!keep_stressing_flag()) if (!keep_stressing_flag())
break; break;
#if defined(HAVE_GETPGRP) #if defined(HAVE_GETPGRP)
pid = getpgrp(); pid = getpgrp();
(void)pid; (void)pid;
#endif #endif
skipping to change at line 452 skipping to change at line 454
#if defined(HAVE_LINUX_SYSCTL_H) && \ #if defined(HAVE_LINUX_SYSCTL_H) && \
defined(__NR__sysctl) defined(__NR__sysctl)
{ {
/* /*
* _sysctl is a deprecated API, so it * _sysctl is a deprecated API, so it
* probably will return -ENOSYS * probably will return -ENOSYS
*/ */
int name[] = { KERN_VERSION }; int name[] = { KERN_VERSION };
char kern_version[64]; char kern_version[64];
size_t kern_version_len; size_t kern_version_len = 0;
struct __sysctl_args sysctl_args; struct __sysctl_args sysctl_args;
(void)memset(&sysctl_args, 0, sizeof(sysctl_args)); (void)memset(&sysctl_args, 0, sizeof(sysctl_args));
sysctl_args.name = name; sysctl_args.name = name;
sysctl_args.nlen = SIZEOF_ARRAY(name); sysctl_args.nlen = SIZEOF_ARRAY(name);
sysctl_args.oldval = kern_version; sysctl_args.oldval = kern_version;
sysctl_args.oldlenp = &kern_version_len; sysctl_args.oldlenp = &kern_version_len;
sysctl_args.newval = NULL; sysctl_args.newval = NULL;
sysctl_args.newlen = 0; sysctl_args.newlen = 0;
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)