Skip to content

Commit b252ec0

Browse files
committed
* Fix const'ness similar to r1936843
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1936917 13f79535-47bb-0310-9956-ffa450edef68
1 parent da2256b commit b252ec0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

dbd/apr_dbd_oracle.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,19 +849,20 @@ static int dbd_oracle_query(apr_dbd_t *sql, int *nrows, const char *query)
849849
static const char *dbd_oracle_escape(apr_pool_t *pool, const char *arg,
850850
apr_dbd_t *sql)
851851
{
852-
char *newstr, *src, *dst, *sq;
852+
char *newstr, *dst;
853+
const char *src, *sq;
853854
int qcount;
854855

855856
/* return the original if there are no single-quotes */
856857
if (!(sq = strchr(arg, '\'')))
857-
return (char *)arg;
858+
return arg;
858859
/* count the single-quotes and allocate a new buffer */
859860
for (qcount = 1; (sq = strchr(sq + 1, '\'')); )
860861
qcount++;
861862
newstr = apr_palloc(pool, strlen(arg) + qcount + 1);
862863

863864
/* move chars, doubling all single-quotes */
864-
src = (char *)arg;
865+
src = arg;
865866
for (dst = newstr; *src; src++) {
866867
if ((*dst++ = *src) == '\'')
867868
*dst++ = '\'';

0 commit comments

Comments
 (0)