Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
3fe6dd74
Commit
3fe6dd74
authored
Jun 27, 2012
by
Dmitry Antipov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* alloc.c (allocate_string): Remove two redundant calls
to memset, add explicit initialization where appropriate.
parent
1ba6038a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
src/ChangeLog
src/ChangeLog
+5
-0
src/alloc.c
src/alloc.c
+6
-3
No files found.
src/ChangeLog
View file @
3fe6dd74
2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
* alloc.c (allocate_string): Remove two redundant calls
to memset, add explicit initialization where appropriate.
2012-06-27 Glenn Morris <rgm@gnu.org>
* lisp.mk (lisp): Remove paths.elc.
...
...
src/alloc.c
View file @
3fe6dd74
...
...
@@ -1936,13 +1936,14 @@ allocate_string (void)
int
i
;
b
=
(
struct
string_block
*
)
lisp_malloc
(
sizeof
*
b
,
MEM_TYPE_STRING
);
memset
(
b
,
0
,
sizeof
*
b
);
b
->
next
=
string_blocks
;
string_blocks
=
b
;
for
(
i
=
STRING_BLOCK_SIZE
-
1
;
i
>=
0
;
--
i
)
{
s
=
b
->
strings
+
i
;
/* Every string on a free list should have NULL data pointer. */
s
->
data
=
NULL
;
NEXT_FREE_LISP_STRING
(
s
)
=
string_free_list
;
string_free_list
=
s
;
}
...
...
@@ -1958,8 +1959,10 @@ allocate_string (void)
MALLOC_UNBLOCK_INPUT
;
/* Probably not strictly necessary, but play it safe. */
memset
(
s
,
0
,
sizeof
*
s
);
/* SIZE and SIZE_BYTE fields will be initialized
by calling allocate_string_data. */
s
->
intervals
=
NULL_INTERVAL
;
s
->
data
=
NULL
;
--
total_free_strings
;
++
total_strings
;
...
...
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