summaryrefslogtreecommitdiff
path: root/pjlib/src/pj
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj')
-rw-r--r--pjlib/src/pj/errno.c10
-rw-r--r--pjlib/src/pj/pool_caching.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/pjlib/src/pj/errno.c b/pjlib/src/pj/errno.c
index dd39e23c..8cf90f3c 100644
--- a/pjlib/src/pj/errno.c
+++ b/pjlib/src/pj/errno.c
@@ -98,11 +98,11 @@ static int pjlib_error(pj_status_t code, char *buf, pj_size_t size)
for (i=0; i<sizeof(err_str)/sizeof(err_str[0]); ++i) {
if (err_str[i].code == code) {
- pj_size_t len = strlen(err_str[i].msg);
- if (len >= size) len = size-1;
- pj_memcpy(buf, err_str[i].msg, len);
- buf[len] = '\0';
- return (int)len;
+ pj_size_t len2 = pj_ansi_strlen(err_str[i].msg);
+ if (len2 >= size) len2 = size-1;
+ pj_memcpy(buf, err_str[i].msg, len2);
+ buf[len2] = '\0';
+ return (int)len2;
}
}
#endif
diff --git a/pjlib/src/pj/pool_caching.c b/pjlib/src/pj/pool_caching.c
index 3a969233..8e2c9920 100644
--- a/pjlib/src/pj/pool_caching.c
+++ b/pjlib/src/pj/pool_caching.c
@@ -90,8 +90,8 @@ PJ_DEF(void) pj_caching_pool_destroy( pj_caching_pool *cp )
/* Delete all pool in free list */
for (i=0; i < PJ_CACHING_POOL_ARRAY_SIZE; ++i) {
- pj_pool_t *pool = (pj_pool_t*) cp->free_list[i].next;
pj_pool_t *next;
+ pool = (pj_pool_t*) cp->free_list[i].next;
for (; pool != (void*)&cp->free_list[i]; pool = next) {
next = pool->next;
pj_list_erase(pool);