From: Frank Lahm Date: Mon, 2 Apr 2012 11:35:24 +0000 (+0200) Subject: Fix C sequence point constraint violation X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=2119de44cdf2b9a85339e9917a534a15079f4704 Fix C sequence point constraint violation --- 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;