Skip to content
GitLab
Menu
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
06c80621
Commit
06c80621
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: improve two comments
parent
d2b25120
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils.c
+3
-3
src/utils.c
with
3 additions
and
3 deletions
+3
-3
src/utils.c
View file @
06c80621
...
...
@@ -404,8 +404,8 @@ void *nrealloc(void *ptr, size_t howmuch)
return
r
;
}
/*
C
opy the first n characters of
one malloc()ed string to anoth
er
*
pointer. Should be used as
: "dest = mallocstrncpy(dest, src, n);". */
/*
Allocate and c
opy the first n characters of
the given src string, aft
er
*
freeing the destination. Usage
: "dest = mallocstrncpy(dest, src, n);". */
char
*
mallocstrncpy
(
char
*
dest
,
const
char
*
src
,
size_t
n
)
{
if
(
src
==
NULL
)
...
...
@@ -420,7 +420,7 @@ char *mallocstrncpy(char *dest, const char *src, size_t n)
return
dest
;
}
/*
Copy one malloc()ed string to another pointer
. Should be used as:
/*
Free the dest string and return a malloc'ed copy of src
. Should be used as:
* "dest = mallocstrcpy(dest, src);". */
char
*
mallocstrcpy
(
char
*
dest
,
const
char
*
src
)
{
...
...
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