jim         99/03/07 07:41:57

  Modified:    src/main http_core.c
  Log:
  Older OSs simply return non-0 on fseek errors
  
  Revision  Changes    Path
  1.254     +5 -1      apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.253
  retrieving revision 1.254
  diff -u -r1.253 -r1.254
  --- http_core.c       1999/03/07 15:35:17     1.253
  +++ http_core.c       1999/03/07 15:41:56     1.254
  @@ -3070,7 +3070,11 @@
            else {
                long offset, length;
                while (ap_each_byterange(r, &offset, &length)) {
  -                 if (fseek(f, offset, SEEK_SET) == -1) {
  +                 /*
  +                  * Non zero returns are more portable than checking
  +                  * for a return of -1.
  +                  */
  +                 if (fseek(f, offset, SEEK_SET)) {
                        ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
                              "Failed to fseek for byterange (%ld, %ld)",
                              offset, length);
  
  
  

Reply via email to