]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Check return value of lseek correctly
authorAlan T. DeKok <aland@freeradius.org>
Fri, 28 Jan 2011 11:14:03 +0000 (12:14 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 28 Jan 2011 11:14:03 +0000 (12:14 +0100)
src/modules/rlm_detail/rlm_detail.c

index cf304d4db4f724d919391c783f060ccb31156ca2..1cf1de91693568d4e9b6ea59adb765d4d7bfecec 100644 (file)
@@ -386,7 +386,7 @@ static int do_detail(void *instance, REQUEST *request, RADIUS_PACKET *packet,
        /*
         *      Post a timestamp
         */
-       if (lseek(outfd, 0L, SEEK_END) != 0) {
+       if (lseek(outfd, 0L, SEEK_END) < 0) {
                radlog_request(L_ERR, 0, request, "rlm_detail: Failed to seek to the end of detail file %s",
                        buffer);
                close(outfd);