diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-12-27 20:32:43 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-12-27 20:32:43 +0000 |
| commit | 86b915901a7174298c4997004b562a75726a1068 (patch) | |
| tree | 60063af33b3d1bbdd77706933c1946c70e951732 /src/http/modules/perl/nginx.xs | |
| parent | ce5d6e3237bf57f8773c00178e166c8e7cfe986c (diff) | |
| download | nginx-86b915901a7174298c4997004b562a75726a1068.tar.gz nginx-86b915901a7174298c4997004b562a75726a1068.tar.bz2 | |
optimization
Diffstat (limited to '')
| -rw-r--r-- | src/http/modules/perl/nginx.xs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 78455b951..c665446e5 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -613,7 +613,6 @@ sendfile(r, filename, offset = -1, bytes = 0) 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 = 0) (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; } |
