From 2119de44cdf2b9a85339e9917a534a15079f4704 Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Mon, 2 Apr 2012 13:35:24 +0200 Subject: [PATCH] Fix C sequence point constraint violation --- etc/afpd/fork.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/etc/afpd/fork.c b/etc/afpd/fork.c index 319f33f2..2216a45c 100644 --- a/etc/afpd/fork.c +++ b/etc/afpd/fork.c @@ -880,11 +880,9 @@ static int read_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, si an error. we can't do this with translation on. */ #ifdef WITH_SENDFILE if (!(obj->options.flags & OPTION_NOSENDFILE)) { - if (dsi_stream_read_file(dsi, - ad_readfile_init(ofork->of_ad, eid, &offset, 0), - offset, - dsi->datasize) < 0) { - switch (errno) { + int fd = ad_readfile_init(ofork->of_ad, eid, &offset, 0); + if (dsi_stream_read_file(dsi, fd, offset, dsi->datasize) < 0) { + switch (errno) { case EINVAL: case ENOSYS: goto afp_read_loop; -- 2.39.2