celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Broekhuis (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CELIX-216) Replace strtok with strtok_r
Date Fri, 06 Feb 2015 19:36:35 GMT
Alexander Broekhuis created CELIX-216:

             Summary: Replace strtok with strtok_r
                 Key: CELIX-216
                 URL: https://issues.apache.org/jira/browse/CELIX-216
             Project: Celix
          Issue Type: Improvement
            Reporter: Alexander Broekhuis

Currently strtok is used in several places. While on a first inspection this is ok in most
places, there are several side-effects when a function using strtok is called inside a strtok
invocation as well. This is not obvious at first sight, so using strtok is risky at best.

To prevent this strtok should be replaced with strtok_r, which provides an API in which a
pointer can be used to keep track of the strtok invocation.

strtok is used in:
* launcher.c:123 main
* discovery
-- endpoint_discovery_poller.c:93 endpointDiscoveryPoller_create
* remote_service_admin_http
-- remote_service_admin_impl.c:394 remoteServiceAdmin_exportService
-- remote_service_admin_impl.c:400 remoteServiceAdmin_exportService
-- remote_service_admin_impl.c:402 remoteServiceAdmin_exportService
* remote_service_admin_shm
-- remote_service_admin_impl.c:487 remoteServiceAdmin_exportService
-- remote_service_admin_impl.c:493 remoteServiceAdmin_exportService
-- remote_service_admin_impl.c:495 remoteServiceAdmin_exportService
* shell
-- help_command.c:65 helpCommand_execute
-- install_command.c:61 installCommand_execute
-- ps_command.c:67 psCommand_execute
-- start_command.c:55 startCommand_execute
-- stop_command.c:56 stopCommand_execute
-- uninstall_command.c:57 uninstallCommand_execute
-- update_command.c:63 updateCommand_execute

This message was sent by Atlassian JIRA

View raw message