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
6a326a67
...
6a326a67e98311bc5ca64c3ed946ec3aeb31b392
authored
2003-01-18 21:59:29 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use mh_err_memory to report low memory diagnostics.
1 parent
f75305db
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
22 deletions
mh/mh_argp.c
mh/mh_ctx.c
mh/mh_msgset.c
mh/mh_whatnow.c
mh/mh_argp.c
View file @
6a326a6
...
...
@@ -97,10 +97,7 @@ mh_argp_parse (int argc, char **argv,
_argc
=
argc
+
xargc
;
_argv
=
calloc
(
_argc
+
1
,
sizeof
*
_argv
);
if
(
!
_argv
)
{
mh_error
(
_
(
"not enough memory"
));
abort
();
}
mh_err_memory
(
1
);
i
=
0
;
_argv
[
i
++
]
=
argv
[
0
];
...
...
mh/mh_ctx.c
View file @
6a326a6
...
...
@@ -27,20 +27,14 @@ mh_context_create (char *name, int copy)
mh_context_t
*
ctx
;
ctx
=
malloc
(
sizeof
(
*
ctx
));
if
(
!
ctx
)
{
mu_error
(
_
(
"not enough memory"
));
abort
();
}
mh_err_memory
(
1
);
if
(
copy
)
ctx
->
name
=
name
;
else
{
ctx
->
name
=
strdup
(
name
);
if
(
!
ctx
->
name
)
{
mu_error
(
_
(
"not enough memory"
));
abort
();
}
mh_err_memory
(
1
);
}
ctx
->
header
=
NULL
;
return
ctx
;
...
...
mh/mh_msgset.c
View file @
6a326a6
...
...
@@ -31,10 +31,7 @@ _expand (size_t *msgcnt, size_t **msglist, size_t inc)
*
msgcnt
+=
inc
;
*
msglist
=
realloc
(
*
msglist
,
(
*
msgcnt
)
*
sizeof
(
**
msglist
));
if
(
!*
msglist
)
{
mh_error
(
_
(
"not enough memory"
));
abort
();
}
mh_err_memory
(
1
);
}
/* Fatal error handler */
...
...
@@ -589,10 +586,7 @@ mh_msgset_negate (mailbox_t mbox, mh_msgset_t *msgset)
mailbox_messages_count
(
mbox
,
&
total
);
list
=
calloc
(
total
,
sizeof
(
list
[
0
]));
if
(
!
list
)
{
mh_error
(
_
(
"not enough memory"
));
abort
();
}
mh_err_memory
(
1
);
for
(
i
=
1
,
msgno
=
0
;
i
<=
total
;
i
++
)
{
...
...
mh/mh_whatnow.c
View file @
6a326a6
...
...
@@ -290,8 +290,8 @@ edit (struct mh_whatnow_env *wh, int argc, char **argv, int *status)
xargv
=
calloc
(
argc
+
2
,
sizeof
(
*
xargv
));
if
(
!
xargv
)
{
mh_error
(
_
(
"not enough memory"
)
);
{
mh_err_memory
(
0
);
return
0
;
}
...
...
Please
register
or
sign in
to post a comment