Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
7496625f
Commit
7496625f
authored
Jul 09, 2012
by
Yukihiro Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initialize stuctures on stack without memset(); close #350
parent
c3201370
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/load.c
src/load.c
+2
-2
src/time.c
src/time.c
+1
-1
No files found.
src/load.c
View file @
7496625f
...
@@ -248,12 +248,12 @@ mrb_load_irep(mrb_state *mrb, FILE* fp)
...
@@ -248,12 +248,12 @@ mrb_load_irep(mrb_state *mrb, FILE* fp)
unsigned
char
hex8
[
8
],
hcrc
[
4
];
unsigned
char
hex8
[
8
],
hcrc
[
4
];
unsigned
char
*
dst
,
*
rite_dst
=
NULL
;
unsigned
char
*
dst
,
*
rite_dst
=
NULL
;
rite_binary_header
bin_header
;
rite_binary_header
bin_header
;
RiteFILE
ritefp
,
*
rfp
;
RiteFILE
ritefp
=
{
0
};
RiteFILE
*
rfp
;
if
((
mrb
==
NULL
)
||
(
fp
==
NULL
))
{
if
((
mrb
==
NULL
)
||
(
fp
==
NULL
))
{
return
MRB_DUMP_INVALID_ARGUMENT
;
return
MRB_DUMP_INVALID_ARGUMENT
;
}
}
memset
(
&
ritefp
,
0
,
sizeof
(
ritefp
));
ritefp
.
fp
=
fp
;
ritefp
.
fp
=
fp
;
rfp
=
&
ritefp
;
rfp
=
&
ritefp
;
...
...
src/time.c
View file @
7496625f
...
@@ -239,7 +239,7 @@ time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday,
...
@@ -239,7 +239,7 @@ time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday,
enum
mrb_timezone
timezone
)
enum
mrb_timezone
timezone
)
{
{
time_t
nowsecs
;
time_t
nowsecs
;
struct
tm
nowtime
;
struct
tm
nowtime
=
{
0
}
;
memset
(
&
nowtime
,
0
,
sizeof
(
struct
tm
));
memset
(
&
nowtime
,
0
,
sizeof
(
struct
tm
));
nowtime
.
tm_year
=
(
int
)
ayear
-
1900
;
nowtime
.
tm_year
=
(
int
)
ayear
-
1900
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment