Lines Matching refs:rval
24 char *rval; in safe_basename() local
26 rval = basename(path); in safe_basename()
27 if (rval == NULL) { in safe_basename()
33 return rval; in safe_basename()
40 int rval; in safe_chdir() local
42 rval = chdir(path); in safe_chdir()
43 if (rval == -1) { in safe_chdir()
49 return rval; in safe_chdir()
56 int rval; in safe_close() local
58 rval = close(fildes); in safe_close()
59 if (rval == -1) { in safe_close()
65 return rval; in safe_close()
72 int rval; in safe_creat() local
74 rval = creat(pathname, mode); in safe_creat()
75 if (rval == -1) { in safe_creat()
81 return rval; in safe_creat()
87 char *rval; in safe_dirname() local
89 rval = dirname(path); in safe_dirname()
90 if (rval == NULL) { in safe_dirname()
96 return rval; in safe_dirname()
102 char *rval; in safe_getcwd() local
104 rval = getcwd(buf, size); in safe_getcwd()
105 if (rval == NULL) { in safe_getcwd()
111 return rval; in safe_getcwd()
117 struct passwd *rval; in safe_getpwnam() local
119 rval = getpwnam(name); in safe_getpwnam()
120 if (rval == NULL) { in safe_getpwnam()
126 return rval; in safe_getpwnam()
133 int rval; in safe_getrusage() local
135 rval = getrusage(who, usage); in safe_getrusage()
136 if (rval == -1) { in safe_getrusage()
142 return rval; in safe_getrusage()
148 void *rval; in safe_malloc() local
150 rval = malloc(size); in safe_malloc()
151 if (rval == NULL) { in safe_malloc()
157 return rval; in safe_malloc()
163 int rval; in safe_mkdir() local
165 rval = mkdir(pathname, mode); in safe_mkdir()
166 if (rval == -1) { in safe_mkdir()
172 return (rval); in safe_mkdir()
178 int rval; in safe_rmdir() local
180 rval = rmdir(pathname); in safe_rmdir()
181 if (rval == -1) { in safe_rmdir()
187 return (rval); in safe_rmdir()
193 int rval; in safe_munmap() local
195 rval = munmap(addr, length); in safe_munmap()
196 if (rval == -1) { in safe_munmap()
202 return rval; in safe_munmap()
209 int rval; in safe_open() local
221 rval = open(pathname, oflags, mode); in safe_open()
222 if (rval == -1) { in safe_open()
228 return rval; in safe_open()
234 int rval; in safe_pipe() local
236 rval = pipe(fildes); in safe_pipe()
237 if (rval == -1) { in safe_pipe()
243 return rval; in safe_pipe()
249 ssize_t rval; in safe_read() local
251 rval = read(fildes, buf, nbyte); in safe_read()
252 if (rval == -1 || (len_strict && (size_t)rval != nbyte)) { in safe_read()
255 file, lineno, fildes, buf, nbyte, rval); in safe_read()
258 return rval; in safe_read()
264 int rval; in safe_setegid() local
266 rval = setegid(egid); in safe_setegid()
267 if (rval == -1) { in safe_setegid()
273 return rval; in safe_setegid()
279 int rval; in safe_seteuid() local
281 rval = seteuid(euid); in safe_seteuid()
282 if (rval == -1) { in safe_seteuid()
288 return rval; in safe_seteuid()
294 int rval; in safe_setgid() local
296 rval = setgid(gid); in safe_setgid()
297 if (rval == -1) { in safe_setgid()
303 return rval; in safe_setgid()
309 int rval; in safe_setuid() local
311 rval = setuid(uid); in safe_setuid()
312 if (rval == -1) { in safe_setuid()
318 return rval; in safe_setuid()
324 int rval; in safe_getresuid() local
326 rval = getresuid(ruid, euid, suid); in safe_getresuid()
327 if (rval == -1) { in safe_getresuid()
333 return rval; in safe_getresuid()
339 int rval; in safe_getresgid() local
341 rval = getresgid(rgid, egid, sgid); in safe_getresgid()
342 if (rval == -1) { in safe_getresgid()
348 return rval; in safe_getresgid()
354 int rval; in safe_unlink() local
356 rval = unlink(pathname); in safe_unlink()
357 if (rval == -1) { in safe_unlink()
363 return rval; in safe_unlink()
371 int rval; in safe_link() local
373 rval = link(oldpath, newpath); in safe_link()
375 if (rval == -1) { in safe_link()
381 return rval; in safe_link()
388 int rval; in safe_linkat() local
390 rval = linkat(olddirfd, oldpath, newdirfd, newpath, flags); in safe_linkat()
392 if (rval == -1) { in safe_linkat()
399 return rval; in safe_linkat()
406 ssize_t rval; in safe_readlink() local
408 rval = readlink(path, buf, bufsize); in safe_readlink()
410 if (rval == -1) { in safe_readlink()
417 if ((size_t) rval < bufsize) in safe_readlink()
418 buf[rval] = '\0'; in safe_readlink()
423 return rval; in safe_readlink()
430 int rval; in safe_symlink() local
432 rval = symlink(oldpath, newpath); in safe_symlink()
434 if (rval == -1) { in safe_symlink()
440 return rval; in safe_symlink()
446 ssize_t rval; in safe_write() local
448 rval = write(fildes, buf, nbyte); in safe_write()
449 if (rval == -1 || (len_strict && (size_t)rval != nbyte)) { in safe_write()
452 file, lineno, fildes, buf, rval); in safe_write()
455 return rval; in safe_write()
461 long rval; in safe_strtol() local
465 rval = strtol(str, &endptr, 10); in safe_strtol()
467 if ((errno == ERANGE && (rval == LONG_MAX || rval == LONG_MIN)) in safe_strtol()
468 || (errno != 0 && rval == 0)) { in safe_strtol()
471 return rval; in safe_strtol()
480 if (rval > max || rval < min) { in safe_strtol()
483 file, lineno, str, rval, min, max); in safe_strtol()
487 return rval; in safe_strtol()
494 unsigned long rval; in safe_strtoul() local
498 rval = strtoul(str, &endptr, 10); in safe_strtoul()
500 if ((errno == ERANGE && rval == ULONG_MAX) in safe_strtoul()
501 || (errno != 0 && rval == 0)) { in safe_strtoul()
504 return rval; in safe_strtoul()
507 if (rval > max || rval < min) { in safe_strtoul()
510 file, lineno, str, rval, min, max); in safe_strtoul()
520 return rval; in safe_strtoul()
526 long rval; in safe_sysconf() local
529 rval = sysconf(name); in safe_sysconf()
531 if (rval == -1) { in safe_sysconf()
544 return rval; in safe_sysconf()
550 int rval; in safe_chmod() local
552 rval = chmod(path, mode); in safe_chmod()
554 if (rval == -1) { in safe_chmod()
560 return rval; in safe_chmod()
566 int rval; in safe_fchmod() local
568 rval = fchmod(fd, mode); in safe_fchmod()
570 if (rval == -1) { in safe_fchmod()
576 return rval; in safe_fchmod()
582 int rval; in safe_chown() local
584 rval = chown(path, owner, group); in safe_chown()
586 if (rval == -1) { in safe_chown()
592 return rval; in safe_chown()
598 int rval; in safe_fchown() local
600 rval = fchown(fd, owner, group); in safe_fchown()
602 if (rval == -1) { in safe_fchown()
608 return rval; in safe_fchown()
614 pid_t rval; in safe_wait() local
616 rval = wait(status); in safe_wait()
617 if (rval == -1) { in safe_wait()
623 return rval; in safe_wait()
629 pid_t rval; in safe_waitpid() local
631 rval = waitpid(pid, status, opts); in safe_waitpid()
632 if (rval == -1) { in safe_waitpid()
638 return rval; in safe_waitpid()
644 void *rval; in safe_memalign() local
646 rval = memalign(alignment, size); in safe_memalign()
647 if (rval == NULL) in safe_memalign()
651 return rval; in safe_memalign()
657 int rval; in safe_kill() local
659 rval = kill(pid, sig); in safe_kill()
661 if (rval == -1) { in safe_kill()
667 return rval; in safe_kill()
673 int rval; in safe_mkfifo() local
675 rval = mkfifo(pathname, mode); in safe_mkfifo()
677 if (rval == -1) { in safe_mkfifo()
683 return rval; in safe_mkfifo()
689 int rval; in safe_rename() local
691 rval = rename(oldpath, newpath); in safe_rename()
693 if (rval == -1) { in safe_rename()
699 return rval; in safe_rename()
730 int rval; in safe_mount() local
747 rval = tst_system(buf); in safe_mount()
748 if (WIFEXITED(rval) && WEXITSTATUS(rval) == 0) in safe_mount()
754 filesystemtype, rval); in safe_mount()
757 filesystemtype, rval); in safe_mount()
762 rval = mount(source, target, filesystemtype, mountflags, data); in safe_mount()
763 if (rval == -1) { in safe_mount()
770 return rval; in safe_mount()
776 int rval; in safe_umount() local
778 rval = umount(target); in safe_umount()
780 if (rval == -1) { in safe_umount()
786 return rval; in safe_umount()
792 DIR *rval; in safe_opendir() local
794 rval = opendir(name); in safe_opendir()
796 if (!rval) { in safe_opendir()
801 return rval; in safe_opendir()
807 int rval; in safe_closedir() local
809 rval = closedir(dirp); in safe_closedir()
811 if (rval) { in safe_closedir()
816 return rval; in safe_closedir()
822 struct dirent *rval; in safe_readdir() local
826 rval = readdir(dirp); in safe_readdir()
828 if (!rval && errno) { in safe_readdir()
834 return rval; in safe_readdir()
839 int rval, err = errno; in safe_getpriority() local
842 rval = getpriority(which, who); in safe_getpriority()
850 return rval; in safe_getpriority()
856 ssize_t rval; in safe_getxattr() local
858 rval = getxattr(path, name, value, size); in safe_getxattr()
860 if (rval == -1) { in safe_getxattr()
872 return rval; in safe_getxattr()
878 int rval; in safe_setxattr() local
880 rval = setxattr(path, name, value, size, flags); in safe_setxattr()
882 if (rval) { in safe_setxattr()
894 return rval; in safe_setxattr()
900 int rval; in safe_lsetxattr() local
902 rval = lsetxattr(path, name, value, size, flags); in safe_lsetxattr()
904 if (rval) { in safe_lsetxattr()
916 return rval; in safe_lsetxattr()
922 int rval; in safe_fsetxattr() local
924 rval = fsetxattr(fd, name, value, size, flags); in safe_fsetxattr()
926 if (rval) { in safe_fsetxattr()
938 return rval; in safe_fsetxattr()
944 int rval; in safe_removexattr() local
946 rval = removexattr(path, name); in safe_removexattr()
948 if (rval) { in safe_removexattr()
960 return rval; in safe_removexattr()
966 int rval; in safe_lremovexattr() local
968 rval = lremovexattr(path, name); in safe_lremovexattr()
970 if (rval) { in safe_lremovexattr()
982 return rval; in safe_lremovexattr()
988 int rval; in safe_fremovexattr() local
990 rval = fremovexattr(fd, name); in safe_fremovexattr()
992 if (rval) { in safe_fremovexattr()
1004 return rval; in safe_fremovexattr()
1009 int rval; in safe_fsync() local
1011 rval = fsync(fd); in safe_fsync()
1013 if (rval) { in safe_fsync()
1018 return rval; in safe_fsync()
1023 pid_t rval; in safe_setsid() local
1025 rval = setsid(); in safe_setsid()
1026 if (rval == -1) { in safe_setsid()
1031 return rval; in safe_setsid()
1037 int rval; in safe_mknod() local
1039 rval = mknod(pathname, mode, dev); in safe_mknod()
1040 if (rval == -1) { in safe_mknod()
1045 return rval; in safe_mknod()
1051 int rval; in safe_mlock() local
1053 rval = mlock(addr, len); in safe_mlock()
1054 if (rval == -1) { in safe_mlock()
1059 return rval; in safe_mlock()
1065 int rval; in safe_munlock() local
1067 rval = munlock(addr, len); in safe_munlock()
1068 if (rval == -1) { in safe_munlock()
1073 return rval; in safe_munlock()
1079 int rval; in safe_mincore() local
1081 rval = mincore(start, length, vec); in safe_mincore()
1082 if (rval == -1) { in safe_mincore()
1087 return rval; in safe_mincore()