From: Matthew Fernandez Date: Sun, 23 Oct 2022 03:05:25 +0000 (-0700) Subject: sfio _sfpopen: remove 'stdio' parameter that is always 0 X-Git-Tag: 7.0.2~19^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c879bec17988fe7ed21a2e22550164becde6295;p=graphviz sfio _sfpopen: remove 'stdio' parameter that is always 0 --- diff --git a/lib/sfio/sfhdr.h b/lib/sfio/sfhdr.h index ebc4571a0..8c80b1b95 100644 --- a/lib/sfio/sfhdr.h +++ b/lib/sfio/sfhdr.h @@ -542,7 +542,7 @@ extern "C" { extern Sfextern_t _Sfextern; extern Sftab_t _Sftable; - extern int _sfpopen(Sfio_t *, int, int, int); + extern int _sfpopen(Sfio_t *, int, int); extern int _sfpclose(Sfio_t *); extern int _sfmode(Sfio_t *, int, int); extern int _sfexcept(Sfio_t *, int, ssize_t, Sfdisc_t *); diff --git a/lib/sfio/sfmode.c b/lib/sfio/sfmode.c index bcf440723..1b0facc5d 100644 --- a/lib/sfio/sfmode.c +++ b/lib/sfio/sfmode.c @@ -160,10 +160,8 @@ Sfrsrv_t *_sfrsrv(Sfio_t * f, ssize_t size) * @param f * @param fd * @param pid - * @param stdio stdio popen() does not reset SIGPIPE handler */ -int _sfpopen(Sfio_t * f, int fd, int pid, int stdio) -{ +int _sfpopen(Sfio_t *f, int fd, int pid) { Sfproc_t *p; if (f->proc) @@ -176,7 +174,7 @@ int _sfpopen(Sfio_t * f, int fd, int pid, int stdio) p->size = p->ndata = 0; p->rdata = NULL; p->file = fd; - p->sigp = (!stdio && pid >= 0 && (f->flags & SF_WRITE)) ? 1 : 0; + p->sigp = (pid >= 0 && (f->flags & SF_WRITE)) ? 1 : 0; #ifdef SIGPIPE /* protect from broken pipe signal */ if (p->sigp) { diff --git a/lib/sfio/sfsetbuf.c b/lib/sfio/sfsetbuf.c index d56b22d20..a4dceb0af 100644 --- a/lib/sfio/sfsetbuf.c +++ b/lib/sfio/sfsetbuf.c @@ -179,7 +179,7 @@ void *sfsetbuf(Sfio_t * f, void * buf, size_t size) /* initialize side buffer for r+w unseekable streams */ if (!f->proc && (f->bits & SF_BOTH)) - (void) _sfpopen(f, -1, -1, 0); + (void) _sfpopen(f, -1, -1); } }