summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bplist.c2
-rw-r--r--src/plist.c2
-rw-r--r--src/time64.c14
-rw-r--r--src/time64.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/bplist.c b/src/bplist.c
index 24326b7..c3fc071 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -339,7 +339,7 @@ static char *plist_utf16be_to_utf8(uint16_t *unistr, long len, long *items_read,
339 read_lead_surrogate = 1; 339 read_lead_surrogate = 1;
340 w = 0x010000 + ((wc & 0x3FF) << 10); 340 w = 0x010000 + ((wc & 0x3FF) << 10);
341 } else { 341 } else {
342 // This is invalid, the next 16 bit char should be a trail surrogate. 342 // This is invalid, the next 16 bit char should be a trail surrogate.
343 // Handling error by skipping. 343 // Handling error by skipping.
344 read_lead_surrogate = 0; 344 read_lead_surrogate = 0;
345 } 345 }
diff --git a/src/plist.c b/src/plist.c
index 7ac146a..57f0be4 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -790,7 +790,7 @@ PLIST_API void plist_dict_merge(plist_t *target, plist_t source)
790 free(key); 790 free(key);
791 key = NULL; 791 key = NULL;
792 } while (1); 792 } while (1);
793 free(it); 793 free(it);
794} 794}
795 795
796PLIST_API plist_t plist_access_pathv(plist_t plist, uint32_t length, va_list v) 796PLIST_API plist_t plist_access_pathv(plist_t plist, uint32_t length, va_list v)
diff --git a/src/time64.c b/src/time64.c
index f1cffd4..db571d8 100644
--- a/src/time64.c
+++ b/src/time64.c
@@ -1,4 +1,4 @@
1/* 1/*
2 2
3Copyright (c) 2007-2010 Michael G Schwern 3Copyright (c) 2007-2010 Michael G Schwern
4 4
@@ -30,7 +30,7 @@ THE SOFTWARE.
30 30
31Programmers who have available to them 64-bit time values as a 'long 31Programmers who have available to them 64-bit time values as a 'long
32long' type can use localtime64_r() and gmtime64_r() which correctly 32long' type can use localtime64_r() and gmtime64_r() which correctly
33converts the time even on 32-bit systems. Whether you have 64-bit time 33converts the time even on 32-bit systems. Whether you have 64-bit time
34values will depend on the operating system. 34values will depend on the operating system.
35 35
36localtime64_r() is a 64-bit equivalent of localtime_r(). 36localtime64_r() is a 64-bit equivalent of localtime_r().
@@ -293,7 +293,7 @@ static int check_tm(struct TM *tm)
293 293
294 assert(tm->tm_wday >= 0); 294 assert(tm->tm_wday >= 0);
295 assert(tm->tm_wday <= 6); 295 assert(tm->tm_wday <= 6);
296 296
297 assert(tm->tm_yday >= 0); 297 assert(tm->tm_yday >= 0);
298 assert(tm->tm_yday <= length_of_year[IS_LEAP(tm->tm_year)]); 298 assert(tm->tm_yday <= length_of_year[IS_LEAP(tm->tm_year)]);
299 299
@@ -368,7 +368,7 @@ static int safe_year(const Year year)
368 year_cycle += 17; 368 year_cycle += 17;
369 369
370 year_cycle %= SOLAR_CYCLE_LENGTH; 370 year_cycle %= SOLAR_CYCLE_LENGTH;
371 if( year_cycle < 0 ) 371 if( year_cycle < 0 )
372 year_cycle = SOLAR_CYCLE_LENGTH + year_cycle; 372 year_cycle = SOLAR_CYCLE_LENGTH + year_cycle;
373 373
374 assert( year_cycle >= 0 ); 374 assert( year_cycle >= 0 );
@@ -674,7 +674,7 @@ struct TM *gmtime64_r (const Time64_T *in_time, struct TM *p)
674 p->tm_hour = v_tm_hour; 674 p->tm_hour = v_tm_hour;
675 p->tm_mon = v_tm_mon; 675 p->tm_mon = v_tm_mon;
676 p->tm_wday = v_tm_wday; 676 p->tm_wday = v_tm_wday;
677 677
678 assert(check_tm(p)); 678 assert(check_tm(p));
679 679
680 return p; 680 return p;
@@ -756,7 +756,7 @@ struct TM *localtime64_r (const Time64_T *timev, struct TM *local_tm)
756 local_tm->tm_year++; 756 local_tm->tm_year++;
757 } 757 }
758 758
759 /* GMT is Jan 1st, xx01 year, but localtime is still Dec 31st 759 /* GMT is Jan 1st, xx01 year, but localtime is still Dec 31st
760 in a non-leap xx00. There is one point in the cycle 760 in a non-leap xx00. There is one point in the cycle
761 we can't account for which the safe xx00 year is a leap 761 we can't account for which the safe xx00 year is a leap
762 year. So we need to correct for Dec 31st comming out as 762 year. So we need to correct for Dec 31st comming out as
@@ -766,7 +766,7 @@ struct TM *localtime64_r (const Time64_T *timev, struct TM *local_tm)
766 local_tm->tm_yday--; 766 local_tm->tm_yday--;
767 767
768 assert(check_tm(local_tm)); 768 assert(check_tm(local_tm));
769 769
770 return local_tm; 770 return local_tm;
771} 771}
772 772
diff --git a/src/time64.h b/src/time64.h
index bf174c6..efdc716 100644
--- a/src/time64.h
+++ b/src/time64.h
@@ -39,7 +39,7 @@ struct TM64 {
39#define TM TM64 39#define TM TM64
40#else 40#else
41#define TM tm 41#define TM tm
42#endif 42#endif
43 43
44 44
45/* Declare public functions */ 45/* Declare public functions */