Increase clarity of the len-check
This commit is contained in:
parent
67750f916f
commit
3962978bdd
1 changed files with 1 additions and 1 deletions
2
quark.c
2
quark.c
|
@ -273,7 +273,7 @@ responsedir(void) {
|
||||||
size_t len = strlen(reqbuf);
|
size_t len = strlen(reqbuf);
|
||||||
DIR *d;
|
DIR *d;
|
||||||
|
|
||||||
if (len && (reqbuf[len - 1] != '/') && (len + 1 < MAXBUFLEN)) {
|
if (len > 0 && (reqbuf[len - 1] != '/') && (len + 1 < MAXBUFLEN)) {
|
||||||
/* add directory terminator if necessary */
|
/* add directory terminator if necessary */
|
||||||
reqbuf[len] = '/';
|
reqbuf[len] = '/';
|
||||||
reqbuf[len + 1] = 0;
|
reqbuf[len + 1] = 0;
|
||||||
|
|
Loading…
Reference in a new issue