diff src/http/modules/perl/nginx.xs @ 1799:0b5b94805d26

optimization
author Igor Sysoev <igor@sysoev.ru>
date Thu, 27 Dec 2007 20:32:43 +0000
parents 25c93614e6b9
children 2e3353955c32
line wrap: on
line diff
--- a/src/http/modules/perl/nginx.xs
+++ b/src/http/modules/perl/nginx.xs
@@ -613,7 +613,6 @@ sendfile(r, filename, offset = -1, bytes
     char                      *filename;
     int                        offset;
     size_t                     bytes;
-    ngx_int_t                  rc;
     ngx_str_t                  path;
     ngx_buf_t                 *b;
     ngx_open_file_info_t       of;
@@ -657,10 +656,9 @@ sendfile(r, filename, offset = -1, bytes
 
     (void) ngx_cpystrn(path.data, filename, path.len + 1);
 
-    rc = ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool);
-
-    if (rc == NGX_ERROR) {
-
+    if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
+        != NGX_OK)
+    {
         if (of.err == 0) {
             XSRETURN_EMPTY;
         }