Change-Id: I080dc2c315851b5f0166c20ef8bf9ac856ae6b3b
Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
} \
} while (0)
-#define DB_CHECK(expr) do { \
- if (expr) { \
- UAM_ERR("(%s) return", #expr); \
- unlink(DATABASE_FULL_PATH); \
- database = NULL; \
- /* Reopen database */ \
- retv_if(SQLITE_OK != __uam_db_open(), UAM_ERROR_DB_FAILED); \
- __uam_db_prepare_table(); \
- } \
-} while (0)
-
/* Helper Functions */
int _uam_db_initialize_once(void);
size_t _uam_get_file_size(const char* filename)
{
struct stat st;
+ size_t size;
if (stat(filename, &st) != 0)
return 0;
+ size = st.st_size;
+ UAM_DBG("File size: %zd", size);
- return st.st_size;
+ return size;
}