diff options
| author | Masaki Muranaka <[email protected]> | 2012-10-24 17:00:54 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2012-10-25 15:47:45 +0900 |
| commit | 1933e2660c86c0731806993a9a212116bb454622 (patch) | |
| tree | 8d0809bef8d017b49638eb1e849671c8a642a5cc /src/proc.c | |
| parent | f5b6f03c9e802702c6f5f74bc3e778f3c4d8baca (diff) | |
| download | mruby-1933e2660c86c0731806993a9a212116bb454622.tar.gz mruby-1933e2660c86c0731806993a9a212116bb454622.zip | |
Use substitution instead of memset in structure initialization.
Diffstat (limited to 'src/proc.c')
| -rw-r--r-- | src/proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/proc.c b/src/proc.c index 3321c2a91..07834e86d 100644 --- a/src/proc.c +++ b/src/proc.c @@ -149,11 +149,12 @@ mrb_init_proc(mrb_state *mrb) { struct RProc *m; mrb_irep *call_irep = (mrb_irep *)mrb_alloca(mrb, sizeof(mrb_irep)); + static const mrb_irep mrb_irep_zero = { 0 }; if ( call_iseq == NULL || call_irep == NULL ) return; - memset(call_irep, 0, sizeof(mrb_irep)); + *call_irep = mrb_irep_zero; call_irep->flags = MRB_ISEQ_NO_FREE; call_irep->idx = -1; call_irep->iseq = call_iseq; |
