}
}
-static const char* __ctsvc_inotify_get_username(uid_t uid)
+static char* __ctsvc_inotify_get_username(uid_t uid)
{
struct passwd pwd;
struct passwd *pwd_result;
int path_len = 0;
char *path = NULL;
uid_t uid = getuid();
- const char *user_name = NULL;
+ char *user_name = NULL;
#ifdef _CONTACTS_IPC_CLIENT
if (ctsvc_client_is_in_system_session()) {
#include <unicode/ucnv.h>
#include <unicode/ustring.h>
#include <tzplatform_config.h>
+#include <limits.h>
#ifdef _CONTACTS_IPC_CLIENT
#include "ctsvc_client_ipc.h"
static int _ctsvc_safe_add(unsigned int* total, unsigned int value)
{
- const unsigned int unsigned_int_max = 4294967295;
- if (unsigned_int_max -*total < value) {
+ if (UINT_MAX -*total < value) {
ERR("overflow occurs when %d + %d", *total, value);
return CONTACTS_ERROR_SYSTEM;
}