diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/memarea.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/memarea.c b/src/common/memarea.c index 65e36e3dd9..7eb54821b9 100644 --- a/src/common/memarea.c +++ b/src/common/memarea.c @@ -237,7 +237,7 @@ memarea_strndup(memarea_t *area, const char *s, size_t n) size_t ln; char *result; const char *cp, *end = s+n; - for (cp = s; *cp && cp < end; ++cp) + for (cp = s; cp < end && *cp; ++cp) ; /* cp now points to s+n, or to the 0 in the string. */ ln = cp-s; |