summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store_types.h4
-rw-r--r--libglusterfs/src/gfdb/gfdb_sqlite3.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/libglusterfs/src/gfdb/gfdb_data_store_types.h b/libglusterfs/src/gfdb/gfdb_data_store_types.h
index f70a43a20fc..f44c4872c5b 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store_types.h
+++ b/libglusterfs/src/gfdb/gfdb_data_store_types.h
@@ -84,11 +84,11 @@ typedef enum gf_db_operation {
typedef struct timeval gfdb_time_t;
/*Convert time into seconds*/
-static inline long int
+static inline uint64_t
gfdb_time_2_usec(gfdb_time_t *gfdb_time)
{
GF_ASSERT(gfdb_time);
- return gfdb_time->tv_sec * GFDB_MICROSEC + gfdb_time->tv_usec;
+ return ((uint64_t) gfdb_time->tv_sec * GFDB_MICROSEC) + gfdb_time->tv_usec;
}
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3.c b/libglusterfs/src/gfdb/gfdb_sqlite3.c
index 5f4a0fc94ae..9fd2d181c45 100644
--- a/libglusterfs/src/gfdb/gfdb_sqlite3.c
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3.c
@@ -665,7 +665,7 @@ gf_sqlite3_find_recently_changed_files(void *db_conn,
char *query_str = NULL;
gf_sql_connection_t *sql_conn = db_conn;
sqlite3_stmt *prep_stmt = NULL;
- long int from_time_usec = 0;
+ uint64_t from_time_usec = 0;
CHECK_SQL_CONN (sql_conn, out);
GF_VALIDATE_OR_GOTO(GFDB_STR_SQLITE3, query_callback, out);
@@ -759,7 +759,7 @@ gf_sqlite3_find_unchanged_for_time (void *db_conn,
char *query_str = NULL;
gf_sql_connection_t *sql_conn = db_conn;
sqlite3_stmt *prep_stmt = NULL;
- long int for_time_usec = 0;
+ uint64_t for_time_usec = 0;
CHECK_SQL_CONN (sql_conn, out);
GF_VALIDATE_OR_GOTO(GFDB_STR_SQLITE3, query_callback, out);
@@ -863,7 +863,7 @@ gf_sqlite3_find_recently_changed_files_freq (void *db_conn,
char *query_str = NULL;
gf_sql_connection_t *sql_conn = db_conn;
sqlite3_stmt *prep_stmt = NULL;
- long int from_time_usec = 0;
+ uint64_t from_time_usec = 0;
CHECK_SQL_CONN (sql_conn, out);
GF_VALIDATE_OR_GOTO(GFDB_STR_SQLITE3, query_callback, out);
@@ -993,7 +993,7 @@ gf_sqlite3_find_unchanged_for_time_freq (void *db_conn,
char *query_str = NULL;
gf_sql_connection_t *sql_conn = db_conn;
sqlite3_stmt *prep_stmt = NULL;
- long int for_time_usec = 0;
+ uint64_t for_time_usec = 0;
CHECK_SQL_CONN (sql_conn, out);
GF_VALIDATE_OR_GOTO (GFDB_STR_SQLITE3, query_callback, out);