summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSemun Lee <semun.lee@samsung.com>2017-07-19 08:32:47 (GMT)
committerSemun Lee <semun.lee@samsung.com>2017-07-19 09:02:15 (GMT)
commit43009f9a009076a67c0ca995489e60c25aaf4606 (patch)
tree95f909d78246fc186f8a14af49a2a70d4fef6bbd
parentc0a4c174740a1dc1eb9f8f04576eeb89601ce823 (diff)
downloadapplication-43009f9a009076a67c0ca995489e60c25aaf4606.zip
application-43009f9a009076a67c0ca995489e60c25aaf4606.tar.gz
application-43009f9a009076a67c0ca995489e60c25aaf4606.tar.bz2
Fix misused strncpy callsrefs/changes/30/139530/3
Change-Id: Iaa2366a447d26e568613ae257dd639dc06917408 Signed-off-by: Semun Lee <semun.lee@samsung.com>
-rwxr-xr-xapp_control/app_control.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/app_control/app_control.c b/app_control/app_control.c
index 55eda27..6d51d44 100755
--- a/app_control/app_control.c
+++ b/app_control/app_control.c
@@ -555,7 +555,7 @@ int app_control_clone(app_control_h *clone, app_control_h app_control)
int app_control_set_launch_mode(app_control_h app_control,
app_control_launch_mode_e mode)
{
- char launch_mode[LAUNCH_MODE_SIZE] = { 0, };
+ const char *launch_mode;
if (app_control_validate(app_control)) {
return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER,
@@ -564,10 +564,10 @@ int app_control_set_launch_mode(app_control_h app_control,
switch (mode) {
case APP_CONTROL_LAUNCH_MODE_SINGLE:
- strncpy(launch_mode, LAUNCH_MODE_SINGLE, strlen(LAUNCH_MODE_SINGLE));
+ launch_mode = LAUNCH_MODE_SINGLE;
break;
case APP_CONTROL_LAUNCH_MODE_GROUP:
- strncpy(launch_mode, LAUNCH_MODE_GROUP, strlen(LAUNCH_MODE_GROUP));
+ launch_mode = LAUNCH_MODE_GROUP;
break;
default:
return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER,