Remove unnecessary initialization in new functions
We don't need to zero things out, we are already using calloc for this purpose. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
1c47500ea6
commit
da933c223e
3 changed files with 0 additions and 22 deletions
|
@ -48,16 +48,7 @@ pmhandle_t *_alpm_handle_new()
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
|
||||||
handle->lckfd = -1;
|
handle->lckfd = -1;
|
||||||
handle->logstream = NULL;
|
|
||||||
|
|
||||||
handle->root = NULL;
|
|
||||||
handle->dbpath = NULL;
|
|
||||||
handle->cachedirs = NULL;
|
|
||||||
handle->lockfile = NULL;
|
|
||||||
handle->logfile = NULL;
|
|
||||||
handle->usedelta = 0;
|
|
||||||
|
|
||||||
return(handle);
|
return(handle);
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,15 +227,6 @@ pmtrans_t *_alpm_trans_new()
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
CALLOC(trans, 1, sizeof(pmtrans_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(trans, 1, sizeof(pmtrans_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
|
||||||
trans->packages = NULL;
|
|
||||||
trans->skip_add = NULL;
|
|
||||||
trans->skip_remove = NULL;
|
|
||||||
trans->type = 0;
|
|
||||||
trans->flags = 0;
|
|
||||||
trans->cb_event = NULL;
|
|
||||||
trans->cb_conv = NULL;
|
|
||||||
trans->cb_progress = NULL;
|
|
||||||
trans->state = STATE_IDLE;
|
trans->state = STATE_IDLE;
|
||||||
|
|
||||||
return(trans);
|
return(trans);
|
||||||
|
|
|
@ -44,10 +44,6 @@ config_t *config_new(void)
|
||||||
newconfig->logmask = PM_LOG_ERROR | PM_LOG_WARNING;
|
newconfig->logmask = PM_LOG_ERROR | PM_LOG_WARNING;
|
||||||
/* CONFFILE is defined at compile-time */
|
/* CONFFILE is defined at compile-time */
|
||||||
newconfig->configfile = strdup(CONFFILE);
|
newconfig->configfile = strdup(CONFFILE);
|
||||||
newconfig->rootdir = NULL;
|
|
||||||
newconfig->dbpath = NULL;
|
|
||||||
newconfig->logfile = NULL;
|
|
||||||
newconfig->syncfirst = NULL;
|
|
||||||
|
|
||||||
return(newconfig);
|
return(newconfig);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue