Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
85bffcfe
Commit
85bffcfe
authored
7 years ago
by
David Lawrence Ramsey
Committed by
Benno Schulenberg
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: use charalloc() instead of (char *)nmalloc() * sizeof(char)
The charalloc() macro does exactly this.
parent
381a386b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/text.c
+2
-2
src/text.c
with
2 additions
and
2 deletions
+2
-2
src/text.c
View file @
85bffcfe
...
...
@@ -3604,7 +3604,7 @@ char *copy_completion(char *check_line, int start)
position
=
next
;
}
word
=
(
char
*
)
nm
alloc
(
(
len_of_word
+
1
)
*
sizeof
(
char
))
;
word
=
charalloc
(
len_of_word
+
1
);
/* Simply copy the word. */
while
(
index
<
len_of_word
)
...
...
@@ -3669,7 +3669,7 @@ void complete_a_word(void)
return
;
}
shard
=
(
char
*
)
nm
alloc
(
(
openfile
->
current_x
-
start_of_shard
+
1
)
*
sizeof
(
char
))
;
shard
=
charalloc
(
openfile
->
current_x
-
start_of_shard
+
1
);
/* Copy the fragment that has to be searched for. */
while
(
start_of_shard
<
openfile
->
current_x
)
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help