projects
/
platform
/
core
/
test
/
security-tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix smack_check() function
[platform/core/test/security-tests.git]
/
src
/
common
/
tests_common.cpp
diff --git
a/src/common/tests_common.cpp
b/src/common/tests_common.cpp
index
6808b57
..
3095243
100644
(file)
--- a/
src/common/tests_common.cpp
+++ b/
src/common/tests_common.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2013
-2015
Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-35,25
+35,15
@@
int DB::Transaction::db_result = PC_OPERATION_SUCCESS;
const char *WGT_APP_ID = "QwCqJ0ttyS";
const char *WGT_APP_ID = "QwCqJ0ttyS";
-int smack_runtime_check(void)
-{
- static int smack_present = -1;
- if (-1 == smack_present) {
- if (smack_smackfs_path()) {
- smack_present = 1;
- } else {
- smack_present = 0;
- }
- }
- return smack_present;
-}
-
-int smack_check(void)
+bool smack_check(void)
{
#ifndef WRT_SMACK_ENABLED
{
#ifndef WRT_SMACK_ENABLED
- return
0
;
+ return
false
;
#else
#else
- return smack_runtime_check();
+ static int smack_present = -1;
+ if (-1 == smack_present)
+ smack_present = smack_smackfs_path() == nullptr ? 0 : 1;
+ return smack_present == 1;
#endif
}
#endif
}