summaryrefslogtreecommitdiff
path: root/cord/cordxtra.c
diff options
context:
space:
mode:
authorJay Krell <jaykrell@microsoft.com>2018-02-19 03:43:37 -0800
committerIvan Maidanski <ivmai@mail.ru>2018-02-20 23:23:07 +0300
commit1247f597253ccec8307729ec02c0630af7732aba (patch)
tree6a736359c7138578444fdf46825b74fc96120d8e /cord/cordxtra.c
parentcbe7f47df136246842c7e8e09d214d56507af878 (diff)
downloadbdwgc-1247f597253ccec8307729ec02c0630af7732aba.tar.gz
Fix 'invalid conversion from const char* to char*' in CORD_batched_chr_proc
Issue #206 (bdwgc). Add const to the variable receiving strchr() result for C++ compatibility. * cord/cordxtra.c (CORD_batched_chr_proc): Change type of occ local variable from char* to const char*; remove register keyword for occ.
Diffstat (limited to 'cord/cordxtra.c')
-rw-r--r--cord/cordxtra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cord/cordxtra.c b/cord/cordxtra.c
index 827b5dbe..97060a80 100644
--- a/cord/cordxtra.c
+++ b/cord/cordxtra.c
@@ -332,9 +332,9 @@ int CORD_rchr_proc(char c, void * client_data)
int CORD_batched_chr_proc(const char *s, void * client_data)
{
register chr_data * d = (chr_data *)client_data;
- register char * occ = strchr(s, d -> target);
+ const char * occ = strchr(s, d -> target);
- if (occ == 0) {
+ if (NULL == occ) {
d -> pos += strlen(s);
return(0);
} else {