bin/csh/misc.c
244
int k = dup(i);
games/hack/hack.pager.c
383
if(dup(fd)) {
include/unistd.h
330
int dup(int);
lib/libc/hidden/unistd.h
47
PROTO_NORMAL(dup);
lib/libcrypto/ec/ec_asn1.c
1380
EC_KEY *dup = NULL;
lib/libcrypto/ec/ec_asn1.c
1390
dup = d2i_ECParameters(NULL, &p, len);
lib/libcrypto/ec/ec_asn1.c
1393
return dup;
lib/libcurses/trace/lib_trace.c
202
MyFD = dup(MyFD); /* allow reopen of same file */
lib/libexpat/tests/structdata.c
64
XML_Char *const dup = (XML_Char *)malloc(byte_count);
lib/libexpat/tests/structdata.c
66
assert(dup != NULL);
lib/libexpat/tests/structdata.c
67
memcpy(dup, s, byte_count);
lib/libexpat/tests/structdata.c
68
return dup;
lib/libssl/tls_content.c
85
uint8_t *dup;
lib/libssl/tls_content.c
87
if ((dup = calloc(1, data_len)) == NULL)
lib/libssl/tls_content.c
89
memcpy(dup, data, data_len);
lib/libssl/tls_content.c
91
tls_content_set_data(content, type, dup, data_len);
libexec/ld.so/ldconfig/shlib.c
111
char *cp, *dup;
libexec/ld.so/ldconfig/shlib.c
117
path = dup = strdup(path);
libexec/ld.so/ldconfig/shlib.c
120
free(dup);
libexec/rpc.rusersd/rusers_proc.c
109
fd = dup(utmp_fd);
libexec/rpc.rusersd/rusers_proc.c
141
fd = dup(utmp_fd);
libexec/rpc.rusersd/rusers_proc.c
205
fd = dup(utmp_fd);
libexec/rpc.rusersd/rusers_proc.c
269
fd = dup(utmp_fd);
regress/lib/libc/orientation/orientation_test.c
124
if ((fd = dup(1)) == -1)
regress/lib/libc/sys/t_dup.c
281
ATF_REQUIRE_ERRNO(EBADF, dup(-1) == -1);
regress/lib/libc/sys/t_dup.c
347
fd = dup(buf[0]);
regress/lib/libc/sys/t_dup.c
77
fd = dup(fd1);
regress/lib/libcrypto/bio/bio_chain.c
476
BIO *dup;
regress/lib/libcrypto/bio/bio_chain.c
482
if ((dup = BIO_dup_chain(bio[0])) == NULL) {
regress/lib/libcrypto/bio/bio_chain.c
489
BIO_free_all(dup);
regress/lib/libcrypto/bio/bio_chain.c
490
if ((dup = BIO_dup_chain(bio[0])) != NULL) {
regress/lib/libcrypto/bio/bio_chain.c
492
BIO_free_all(dup);
regress/lib/libcrypto/mlkem/parse_test_file.c
461
CBS dup;
regress/lib/libcrypto/mlkem/parse_test_file.c
463
CBS_dup(cbs, &dup);
regress/lib/libcrypto/mlkem/parse_test_file.c
464
return CBS_get_bytes(&dup, out, len);
regress/lib/libpthread/blocked_fifo/blocked_fifo.c
129
expected_fd = dup(free_fd);
regress/lib/libpthread/setsockopt/1/setsockopt1.c
61
CHECKe(s2 = dup(s));
regress/lib/libpthread/setsockopt/2/setsockopt2.c
65
CHECKe(s2 = dup(s));
regress/lib/libpthread/setsockopt/2/setsockopt2.c
93
CHECKe(s2 = dup(s));
regress/lib/libpthread/setsockopt/3a/setsockopt3a.c
72
CHECKe(s2 = dup(s));
regress/lib/libpthread/stdfiles/stdfiles.c
27
dup_stdout = dup(STDOUT_FILENO);
regress/sys/kern/dup2/dup2test.c
24
if ((fd1 = dup(orgfd)) < 0)
regress/sys/kern/dup2_self/dup2_self.c
44
if ((fd1 = dup(orgfd)) < 0)
regress/sys/kern/fcntl_dup/fcntl_dup.c
24
if ((fd1 = dup(orgfd)) < 0)
regress/sys/kern/flock/flock.c
1290
fd2 = dup(fd);
regress/sys/kern/flock/flock.c
1380
nfd = dup(fd);
regress/sys/kern/flock/flock.c
1396
nfd = dup(fd);
regress/sys/kern/flock/flock.c
1420
nfd = dup(fd);
regress/sys/kern/flock/flock.c
1490
nfd = dup(fd);
regress/sys/kern/flock/flock.c
1514
nfd = dup(fd);
regress/sys/kern/flock/flock.c
1538
nfd = dup(fd);
regress/sys/kern/pledge/filedescriptor/dup.c
26
if (dup(fdpre) == -1)
regress/sys/kern/pledge/filedescriptor/dup.c
28
if (dup(fdpost) == -1)
regress/sys/kern/poll/poll_close.c
104
saved_fd = dup(sock[1]);
regress/sys/kern/select/select_close.c
103
saved_fd = dup(sock[1]);
sbin/fsck_ext2fs/fsck.h
131
daddr32_t dup;
sbin/fsck_ext2fs/main.c
284
printf(" %d,", dp->dup);
sbin/fsck_ext2fs/pass1.c
340
new->dup = blkno;
sbin/fsck_ext2fs/pass1.c
349
if (dlp->dup == blkno)
sbin/fsck_ext2fs/pass1.c
351
if (dlp == muldup && dlp->dup != blkno)
sbin/fsck_ext2fs/pass1b.c
84
if (dlp->dup == blkno) {
sbin/fsck_ext2fs/pass1b.c
86
dlp->dup = duphead->dup;
sbin/fsck_ext2fs/pass1b.c
87
duphead->dup = blkno;
sbin/fsck_ext2fs/pass4.c
118
if (dlp->dup != blkno)
sbin/fsck_ext2fs/pass4.c
120
dlp->dup = duplist->dup;
sbin/fsck_ffs/fsck.h
196
daddr_t dup;
sbin/fsck_ffs/main.c
319
printf(" %lld,", (long long)dp->dup);
sbin/fsck_ffs/pass1.c
380
new->dup = blkno;
sbin/fsck_ffs/pass1.c
389
if (dlp->dup == blkno)
sbin/fsck_ffs/pass1.c
391
if (dlp == muldup && dlp->dup != blkno)
sbin/fsck_ffs/pass1b.c
100
duphead->dup = blkno;
sbin/fsck_ffs/pass1b.c
97
if (dlp->dup == blkno) {
sbin/fsck_ffs/pass1b.c
99
dlp->dup = duphead->dup;
sbin/fsck_ffs/pass4.c
135
if (dlp->dup != blkno)
sbin/fsck_ffs/pass4.c
137
dlp->dup = duplist->dup;
sbin/resolvd/resolvd.c
639
if ((fd2 = dup(resolvfd)) == -1)
sbin/restore/dirs.c
651
dp = dup(dirp->dd_fd);
sbin/unwind/libunbound/iterator/iterator.c
367
struct ub_packed_rrset_key* dup)
sbin/unwind/libunbound/iterator/iterator.c
371
if(sets[i]->rk.type == dup->rk.type &&
sbin/unwind/libunbound/iterator/iterator.c
372
sets[i]->rk.rrset_class == dup->rk.rrset_class &&
sbin/unwind/libunbound/iterator/iterator.c
373
sets[i]->rk.dname_len == dup->rk.dname_len &&
sbin/unwind/libunbound/iterator/iterator.c
374
query_dname_compare(sets[i]->rk.dname, dup->rk.dname)
sbin/unwind/libunbound/libunbound/libunbound.c
460
char* dup = strdup(ta);
sbin/unwind/libunbound/libunbound/libunbound.c
461
if(!dup) return UB_NOMEM;
sbin/unwind/libunbound/libunbound/libunbound.c
465
free(dup);
sbin/unwind/libunbound/libunbound/libunbound.c
468
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
479
char* dup = strdup(fname);
sbin/unwind/libunbound/libunbound/libunbound.c
480
if(!dup) return UB_NOMEM;
sbin/unwind/libunbound/libunbound/libunbound.c
484
free(dup);
sbin/unwind/libunbound/libunbound/libunbound.c
487
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
497
char* dup = strdup(fname);
sbin/unwind/libunbound/libunbound/libunbound.c
498
if(!dup) return UB_NOMEM;
sbin/unwind/libunbound/libunbound/libunbound.c
502
free(dup);
sbin/unwind/libunbound/libunbound/libunbound.c
506
dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
517
char* dup = strdup(fname);
sbin/unwind/libunbound/libunbound/libunbound.c
518
if(!dup) return UB_NOMEM;
sbin/unwind/libunbound/libunbound/libunbound.c
522
free(dup);
sbin/unwind/libunbound/libunbound/libunbound.c
525
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
sys/net/pf_ruleset.c
179
struct pf_anchor *anchor, *dup;
sys/net/pf_ruleset.c
201
if ((dup = RB_INSERT(pf_anchor_global, &pf_anchors, anchor)) != NULL) {
sys/net/pf_ruleset.c
204
__func__, anchor->path, anchor->name, dup->path, dup->name);
sys/net/pf_ruleset.c
211
dup = RB_INSERT(pf_anchor_node, &parent->children, anchor);
sys/net/pf_ruleset.c
212
if (dup != NULL) {
sys/net/pf_ruleset.c
216
dup->path, dup->name);
usr.bin/aucat/aucat.c
1324
int dup, imin, imax, omin, omax, nch, off, rate, vol, bufsz, hdr, mode;
usr.bin/aucat/aucat.c
1334
dup = 0;
usr.bin/aucat/aucat.c
1389
nch, rate, dup, vol, pos))
usr.bin/aucat/aucat.c
1396
if (!opt_onoff(optarg, &dup))
usr.bin/aucat/aucat.c
1414
nch, rate, dup, 0, pos))
usr.bin/aucat/aucat.c
268
int rate, int dup, int vol, long long pos)
usr.bin/aucat/aucat.c
284
s->dup = dup;
usr.bin/aucat/aucat.c
328
0, dev_pchan - 1, s->omin, s->omax, s->dup);
usr.bin/aucat/aucat.c
343
0, s->afile.nch - 1, s->omin, s->omax, s->dup);
usr.bin/aucat/aucat.c
84
int dup; /* compat with legacy -j option */
usr.bin/aucat/dsp.c
1011
if (dup && nch > 0) {
usr.bin/aucat/dsp.c
974
int omin, int omax, int osubmin, int osubmax, int dup)
usr.bin/bc/bc.y
1153
dup(p[1]);
usr.bin/bc/bc.y
1164
dup(p[0]);
usr.bin/cdio/cddb.c
260
s2 = dup(s);
usr.bin/compress/main.c
496
fd = pipin ? dup(STDIN_FILENO) : open(in, O_RDONLY);
usr.bin/compress/main.c
520
fd = dup(STDOUT_FILENO);
usr.bin/cvs/diff_internals.c
324
fd1 = dup(_fd1);
usr.bin/cvs/diff_internals.c
328
fd2 = dup(_fd2);
usr.bin/cvs/rcs.c
2113
fd = dup(_fd);
usr.bin/cvs/remote.c
176
fd = dup(_fd);
usr.bin/dc/bcode.c
196
{ 'd', dup },
usr.bin/dc/bcode.c
75
static void dup(void);
usr.bin/diff3/diff3prog.c
299
int dup, j, t1, t2;
usr.bin/diff3/diff3prog.c
360
dup = duplicate(&d1->old,&d2->old);
usr.bin/diff3/diff3prog.c
366
separate(dup ? "3" : "");
usr.bin/diff3/diff3prog.c
367
change(1, &d1->old, dup);
usr.bin/diff3/diff3prog.c
372
j = edit(d1, dup, j);
usr.bin/diff3/diff3prog.c
412
change(int i, struct range *rold, int dup)
usr.bin/diff3/diff3prog.c
417
if (dup || debug)
usr.bin/diff3/diff3prog.c
531
edit(struct diff *diff, int dup, int j)
usr.bin/diff3/diff3prog.c
533
if (((dup + 1) & eflag) == 0)
usr.bin/diff3/diff3prog.c
536
overlap[j] = !dup;
usr.bin/diff3/diff3prog.c
537
if (!dup)
usr.bin/less/lsystem.c
111
(void) dup(inp);
usr.bin/less/lsystem.c
75
inp = dup(0);
usr.bin/less/lsystem.c
78
(void) dup(inp);
usr.bin/lex/filter.c
248
if ((to_cfd = dup(1)) == -1)
usr.bin/mail/names.c
302
if ((f = dup(image)) == -1) {
usr.bin/mandoc/read.c
478
if ((fd = dup(fd)) == -1) {
usr.bin/mandoc/term_tag.c
79
if ((tag_files.ofd = dup(STDOUT_FILENO)) == -1) {
usr.bin/openssl/speed.c
2758
if (dup(fd[1]) == -1) {
usr.bin/rdist/common.c
690
(void) dup(fd[PIPE_WRITE]);
usr.bin/rdist/common.c
691
(void) dup(fd[PIPE_WRITE]);
usr.bin/signify/signify.c
100
fd = dup(STDIN_FILENO);
usr.bin/signify/signify.c
98
fd = dup(STDOUT_FILENO);
usr.bin/sndiod/dev.c
1272
s->opt->dup);
usr.bin/sndiod/dev.c
1298
s->opt->dup);
usr.bin/sndiod/dev.c
1305
s->opt->dup);
usr.bin/sndiod/dsp.c
810
int omin, int omax, int osubmin, int osubmax, int dup)
usr.bin/sndiod/dsp.c
847
if (dup && nch > 0) {
usr.bin/sndiod/opt.c
319
int maxweight, int mmc, int dup, unsigned int mode)
usr.bin/sndiod/opt.c
391
o->dup = dup;
usr.bin/sndiod/opt.c
400
(o->dup) ? ", dup" : "", o->maxweight);
usr.bin/sndiod/opt.h
53
int dup; /* true if join/expand enabled */
usr.bin/sndiod/sndiod.c
408
int mode, int vol, int mmc, int dup)
usr.bin/sndiod/sndiod.c
414
MIDI_TO_ADATA(vol), mmc, dup, mode);
usr.bin/sndiod/sndiod.c
510
unsigned int mode, dup, mmc, vol;
usr.bin/sndiod/sndiod.c
531
dup = 1;
usr.bin/sndiod/sndiod.c
578
dup = opt_onoff();
usr.bin/sndiod/sndiod.c
611
mode, vol, mmc, dup) == NULL)
usr.bin/sndiod/sndiod.c
691
mode, vol, 0, dup);
usr.bin/sndiod/sndiod.c
702
o->maxweight, o->mtc != NULL, o->dup, o->mode) == NULL)
usr.bin/sort/mem.c
85
char *dup;
usr.bin/sort/mem.c
87
if ((dup = strdup(str)) == NULL)
usr.bin/sort/mem.c
89
return dup;
usr.bin/ssh/auth2.c
674
struct sshkey **tmp, *dup;
usr.bin/ssh/auth2.c
677
if ((r = sshkey_from_private(key, &dup)) != 0)
usr.bin/ssh/auth2.c
680
authctxt->auth_method_key = dup;
usr.bin/ssh/auth2.c
686
if ((r = sshkey_from_private(key, &dup)) != 0)
usr.bin/ssh/auth2.c
693
authctxt->prev_keys[authctxt->nprev_keys] = dup;
usr.bin/ssh/monitor_wrap.c
630
if ((tmp1 = dup(pmonitor->m_recvfd)) == -1 ||
usr.bin/ssh/monitor_wrap.c
631
(tmp2 = dup(pmonitor->m_recvfd)) == -1) {
usr.bin/ssh/session.c
519
if ((fdout = dup(ptyfd)) == -1) {
usr.bin/ssh/session.c
526
if ((ptymaster = dup(ptyfd)) == -1) {
usr.bin/ssh/ssh-sk-helper.c
321
if ((in = dup(STDIN_FILENO)) == -1 || (out = dup(STDOUT_FILENO)) == -1)
usr.bin/ssh/ssh.c
2002
if ((in = dup(STDIN_FILENO)) == -1 ||
usr.bin/ssh/ssh.c
2003
(out = dup(STDOUT_FILENO)) == -1)
usr.bin/ssh/ssh.c
2188
in = dup(STDIN_FILENO);
usr.bin/ssh/ssh.c
2190
out = dup(STDOUT_FILENO);
usr.bin/ssh/ssh.c
2191
err = dup(STDERR_FILENO);
usr.bin/ssh/sshconnect.c
529
if ((in = dup(STDIN_FILENO)) == -1 ||
usr.bin/ssh/sshconnect.c
530
(out = dup(STDOUT_FILENO)) == -1) {
usr.bin/ssh/sshd-auth.c
585
sock_in = dup(STDIN_FILENO);
usr.bin/ssh/sshd-auth.c
586
sock_out = dup(STDOUT_FILENO);
usr.bin/ssh/sshd-auth.c
589
sock_in = sock_out = dup(STDIN_FILENO);
usr.bin/ssh/sshd-session.c
1037
sock_in = dup(STDIN_FILENO);
usr.bin/ssh/sshd-session.c
1038
sock_out = dup(STDOUT_FILENO);
usr.bin/ssh/sshd-session.c
1041
sock_in = sock_out = dup(STDIN_FILENO);
usr.bin/ssh/sshd-session.c
888
if ((devnull = dup(devnull)) == -1)
usr.bin/ssh/sshd-session.c
933
if ((startup_pipe = dup(REEXEC_CONFIG_PASS_FD)) == -1)
usr.bin/ssh/sshd.c
1417
if ((devnull = dup(devnull)) == -1)
usr.bin/tmux/client.c
470
if ((fd = dup(STDIN_FILENO)) == -1)
usr.bin/tmux/client.c
473
if ((fd = dup(STDOUT_FILENO)) == -1)
usr.bin/tmux/file.c
606
cf->fd = dup(msg->fd);
usr.bin/tmux/file.c
767
cf->fd = dup(msg->fd);
usr.bin/vi/ex/ex_filter.c
99
if ((input[0] = dup(fd)) == -1) {
usr.sbin/amd/amd/host_ops.c
508
(void) dup(fileno(logfp));
usr.sbin/amd/amd/host_ops.c
511
(void) dup(fileno(logfp));
usr.sbin/amd/amd/nfs_start.c
73
int next_fd = dup(0);
usr.sbin/amd/amd/pfs_ops.c
93
(void) dup(fileno(logfp));
usr.sbin/amd/amd/pfs_ops.c
96
(void) dup(fileno(logfp));
usr.sbin/cron/atrun.c
416
if ((fp = fdopen(dup(fd), "r")) == NULL) {
usr.sbin/edquota/edquota.c
405
if ((fp = fdopen(dup(outfd), "w")) == NULL)
usr.sbin/edquota/edquota.c
436
fp = fdopen(dup(infd), "r");
usr.sbin/edquota/edquota.c
542
if ((fp = fdopen(dup(outfd), "w")) == NULL)
usr.sbin/edquota/edquota.c
574
fp = fdopen(dup(infd), "r");
usr.sbin/httpd/config.c
253
else if ((fd = dup(srv->srv_s)) == -1)
usr.sbin/npppd/npppd/privsep.c
238
if ((sock = dup(sock)) == -1)
usr.sbin/npppd/npppd/privsep.c
307
if ((s = dup(s)) == -1)
usr.sbin/pppd/main.c
1050
out = dup(out);
usr.sbin/rdsetroot/rdsetroot.c
91
fsfd = dup(STDOUT_FILENO);
usr.sbin/rdsetroot/rdsetroot.c
93
fsfd = dup(STDIN_FILENO);
usr.sbin/relayd/config.c
809
if ((fd = dup(ofd)) == -1)
usr.sbin/relayd/config.c
863
if ((fd = dup(rlay->rl_s)) == -1)
usr.sbin/rpki-client/cert.c
1538
goto dup;
usr.sbin/rpki-client/cert.c
1543
goto dup;
usr.sbin/rpki-client/cert.c
1549
goto dup;
usr.sbin/rpki-client/cert.c
1555
goto dup;
usr.sbin/rpki-client/cert.c
1560
goto dup;
usr.sbin/rpki-client/cert.c
1565
goto dup;
usr.sbin/rpki-client/cert.c
1571
goto dup;
usr.sbin/rpki-client/cert.c
1577
goto dup;
usr.sbin/rpki-client/cert.c
1583
goto dup;
usr.sbin/rpki-client/cert.c
1589
goto dup;
usr.sbin/rpki-client/cert.c
1595
goto dup;
usr.sbin/rpki-client/cert.c
1791
dup:
usr.sbin/smtpd/mail.lmtp.c
236
if ((fd_write = dup(fd_read)) == -1)
usr.sbin/smtpd/queue_backend.c
304
if ((fd = dup(fdout)) == -1)
usr.sbin/smtpd/queue_backend.c
326
if ((fd = dup(fdout)) == -1)
usr.sbin/smtpd/queue_ram.c
163
fd2 = dup(fd);
usr.sbin/smtpd/table_proc.c
136
if ((fdd = dup(fd)) == -1) {
usr.sbin/traceroute/traceroute.c
943
if (tr_results[recv_seq].dup++)
usr.sbin/traceroute/traceroute.h
120
int dup;
usr.sbin/traceroute/worker.c
1039
if (tr_row[i].dup)
usr.sbin/traceroute/worker.c
1044
tr_row[i].dup++; /* we "saw" the result */
usr.sbin/unbound/iterator/iterator.c
367
struct ub_packed_rrset_key* dup)
usr.sbin/unbound/iterator/iterator.c
371
if(sets[i]->rk.type == dup->rk.type &&
usr.sbin/unbound/iterator/iterator.c
372
sets[i]->rk.rrset_class == dup->rk.rrset_class &&
usr.sbin/unbound/iterator/iterator.c
373
sets[i]->rk.dname_len == dup->rk.dname_len &&
usr.sbin/unbound/iterator/iterator.c
374
query_dname_compare(sets[i]->rk.dname, dup->rk.dname)
usr.sbin/unbound/libunbound/libunbound.c
460
char* dup = strdup(ta);
usr.sbin/unbound/libunbound/libunbound.c
461
if(!dup) return UB_NOMEM;
usr.sbin/unbound/libunbound/libunbound.c
465
free(dup);
usr.sbin/unbound/libunbound/libunbound.c
468
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
479
char* dup = strdup(fname);
usr.sbin/unbound/libunbound/libunbound.c
480
if(!dup) return UB_NOMEM;
usr.sbin/unbound/libunbound/libunbound.c
484
free(dup);
usr.sbin/unbound/libunbound/libunbound.c
487
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
497
char* dup = strdup(fname);
usr.sbin/unbound/libunbound/libunbound.c
498
if(!dup) return UB_NOMEM;
usr.sbin/unbound/libunbound/libunbound.c
502
free(dup);
usr.sbin/unbound/libunbound/libunbound.c
506
dup)) {
usr.sbin/unbound/libunbound/libunbound.c
517
char* dup = strdup(fname);
usr.sbin/unbound/libunbound/libunbound.c
518
if(!dup) return UB_NOMEM;
usr.sbin/unbound/libunbound/libunbound.c
522
free(dup);
usr.sbin/unbound/libunbound/libunbound.c
525
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
usr.sbin/vmd/config.c
450
if ((fd = dup(vm->vm_tty)) == -1) {
usr.sbin/vmd/config.c
481
vm->vm_vmid, dup(tapfds[i]), &var, sizeof(var));