diff options
-rw-r--r-- | src/Date.cpp | 3 | ||||
-rw-r--r-- | src/plist.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Date.cpp b/src/Date.cpp index 46ef14e..1aebfab 100644 --- a/src/Date.cpp +++ b/src/Date.cpp @@ -68,7 +68,8 @@ timeval Date::GetValue() int32_t tv_sec = 0; int32_t tv_usec = 0; plist_get_date_val(_node, &tv_sec, &tv_usec); - return {tv_sec, tv_usec}; + timeval t = {tv_sec, tv_usec}; + return t; } }; diff --git a/src/plist.c b/src/plist.c index ed73d53..95b9593 100644 --- a/src/plist.c +++ b/src/plist.c @@ -472,8 +472,8 @@ static void plist_get_type_and_value(plist_t node, plist_type * type, void *valu break; case PLIST_DATE: //exception : here we use memory on the stack since it is just a temporary buffer - (*((GTimeVal **) value))->tv_sec = data->timeval.tv_sec; - (*((GTimeVal **) value))->tv_usec = data->timeval.tv_usec; + ((GTimeVal *) value)->tv_sec = data->timeval.tv_sec; + ((GTimeVal *) value)->tv_usec = data->timeval.tv_usec; break; case PLIST_ARRAY: case PLIST_DICT: |