/*
- * 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.
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
- return 0;
+ return false;
#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
}