code cleanup
This commit is contained in:
parent
79f4b5acf4
commit
3eebe8fc2b
@ -25,7 +25,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
/* pacman */
|
/* pacman */
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "error.h"
|
||||||
|
#include "log.h"
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
|
#include "alpm.h"
|
||||||
|
|
||||||
pmgrp_t *_alpm_grp_new()
|
pmgrp_t *_alpm_grp_new()
|
||||||
{
|
{
|
||||||
@ -33,7 +36,9 @@ pmgrp_t *_alpm_grp_new()
|
|||||||
|
|
||||||
grp = (pmgrp_t *)malloc(sizeof(pmgrp_t));
|
grp = (pmgrp_t *)malloc(sizeof(pmgrp_t));
|
||||||
if(grp == NULL) {
|
if(grp == NULL) {
|
||||||
return(NULL);
|
_alpm_log(PM_LOG_ERROR, "malloc failure: could not allocate %d bytes",
|
||||||
|
sizeof(pmgrp_t));
|
||||||
|
RET_ERR(PM_ERR_MEMORY, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
grp->name[0] = '\0';
|
grp->name[0] = '\0';
|
||||||
|
@ -35,9 +35,9 @@ typedef struct __pmlist_t PMList;
|
|||||||
#define FREELIST(p) _FREELIST(p, free)
|
#define FREELIST(p) _FREELIST(p, free)
|
||||||
#define FREELISTPTR(p) _FREELIST(p, NULL)
|
#define FREELISTPTR(p) _FREELIST(p, NULL)
|
||||||
|
|
||||||
typedef void (*_alpm_fn_free) (void *);
|
typedef void (*_alpm_fn_free)(void *);
|
||||||
/* Sort comparison callback function declaration */
|
/* Sort comparison callback function declaration */
|
||||||
typedef int (*_alpm_fn_cmp) (const void *, const void *);
|
typedef int (*_alpm_fn_cmp)(const void *, const void *);
|
||||||
|
|
||||||
PMList *_alpm_list_new(void);
|
PMList *_alpm_list_new(void);
|
||||||
void _alpm_list_free(PMList *list, _alpm_fn_free fn);
|
void _alpm_list_free(PMList *list, _alpm_fn_free fn);
|
||||||
|
@ -25,9 +25,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef CYGWIN
|
#include <limits.h>
|
||||||
#include <limits.h> /* PATH_MAX */
|
|
||||||
#endif
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#include <libtar.h>
|
#include <libtar.h>
|
||||||
/* pacman */
|
/* pacman */
|
||||||
|
Loading…
Reference in New Issue
Block a user