Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
6da00798
...
6da00798774c622fa265407b84e18fb9d2d2f2f9
authored
2002-09-27 13:25:57 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Descriptive comment regarding the allocation of the return values.
1 parent
95fdc09c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
mh/mh_ctx.c
mh/mh_ctx.c
View file @
6da0079
...
...
@@ -16,7 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* MH context functions. */
#include <mh.h>
#include <sys/types.h>
#include <sys/stat.h>
...
...
@@ -107,8 +107,13 @@ mh_context_write (mh_context_t *ctx)
return
0
;
}
/* FIXME: mh_context_get_value returns a pointer to the allocated memory.
Instead, it should return a const pointer to the static storage within
the header_t structure and be declared as
`const char *mh_context_get_value()'. Current implementation of
header_.* functions does not allow that. */
char
*
mh_context_get_value
(
mh_context_t
*
ctx
,
const
char
*
name
,
char
*
defval
)
mh_context_get_value
(
mh_context_t
*
ctx
,
const
char
*
name
,
c
onst
c
har
*
defval
)
{
char
*
p
;
...
...
@@ -118,7 +123,7 @@ mh_context_get_value (mh_context_t *ctx, const char *name, char *defval)
}
int
mh_context_set_value
(
mh_context_t
*
ctx
,
const
char
*
name
,
char
*
value
)
mh_context_set_value
(
mh_context_t
*
ctx
,
const
char
*
name
,
c
onst
c
har
*
value
)
{
if
(
!
ctx
->
header
)
{
...
...
Please
register
or
sign in
to post a comment