libmisc: Move xmalloc.c to alloc.c
We'll expand the contents in a following commit, so let's move the file to a more generic name, have a dedicated header, and update includes. Signed-off-by: Alejandro Colomar <alx@kernel.org> Use the new header for xstrdup() Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
a578617cc0
commit
881c1d63a1
@ -477,11 +477,6 @@ extern int setutmp (struct utmp *ut);
|
||||
/* valid.c */
|
||||
extern bool valid (const char *, const struct passwd *);
|
||||
|
||||
/* xmalloc.c */
|
||||
extern /*@maynotreturn@*/ /*@only@*//*@out@*//*@notnull@*/void *xmalloc (size_t size)
|
||||
/*@ensures MaxSet(result) == (size - 1); @*/;
|
||||
extern /*@maynotreturn@*/ /*@only@*//*@notnull@*/char *xstrdup (const char *);
|
||||
|
||||
/* xgetpwnam.c */
|
||||
extern /*@null@*/ /*@only@*/struct passwd *xgetpwnam (const char *);
|
||||
/* xgetpwuid.c */
|
||||
|
Reference in New Issue
Block a user