Mercurial > hg > nginx
comparison src/http/modules/ngx_http_autoindex_module.c @ 5069:e9d188e295cf
Fixed false memset warning on Linux with -O3 (ticket #275).
Prodded by John Leach.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 13 Feb 2013 14:39:46 +0000 |
parents | 778ef9c3fd2d |
children | f026adb935ad 5fa350899fe0 |
comparison
equal
deleted
inserted
replaced
5065:8b02da13b1d2 | 5069:e9d188e295cf |
---|---|
487 *b->last++ = '/'; | 487 *b->last++ = '/'; |
488 len++; | 488 len++; |
489 } | 489 } |
490 | 490 |
491 b->last = ngx_cpymem(b->last, "</a>", sizeof("</a>") - 1); | 491 b->last = ngx_cpymem(b->last, "</a>", sizeof("</a>") - 1); |
492 ngx_memset(b->last, ' ', NGX_HTTP_AUTOINDEX_NAME_LEN - len); | 492 |
493 b->last += NGX_HTTP_AUTOINDEX_NAME_LEN - len; | 493 if (NGX_HTTP_AUTOINDEX_NAME_LEN - len > 0) { |
494 ngx_memset(b->last, ' ', NGX_HTTP_AUTOINDEX_NAME_LEN - len); | |
495 b->last += NGX_HTTP_AUTOINDEX_NAME_LEN - len; | |
496 } | |
494 } | 497 } |
495 | 498 |
496 *b->last++ = ' '; | 499 *b->last++ = ' '; |
497 | 500 |
498 ngx_gmtime(entry[i].mtime + tp->gmtoff * 60 * alcf->localtime, &tm); | 501 ngx_gmtime(entry[i].mtime + tp->gmtoff * 60 * alcf->localtime, &tm); |