Merge branch 'rs/date-mode-pass-by-value'

The codepaths that reach date_mode_from_type() have been updated to
pass "struct date_mode" by value to make them thread safe.

* rs/date-mode-pass-by-value:
  date: make DATE_MODE thread-safe
This commit is contained in:
Junio C Hamano
2024-04-16 14:50:28 -07:00
12 changed files with 44 additions and 44 deletions

View File

@@ -11,7 +11,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
int16_t tz;
timestamp_t ts;
enum date_mode_type dmtype;
struct date_mode *dm;
struct date_mode dm;
if (size <= 4)
/*
@@ -40,10 +40,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
free(str);
dm = date_mode_from_type(dmtype);
dm->local = local;
dm.local = local;
show_date(ts, (int)tz, dm);
date_mode_release(dm);
date_mode_release(&dm);
return 0;
}