Fix open braces style

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Gerardo Exequiel Pozzi 2013-01-03 18:48:52 -03:00 committed by Allan McRae
parent e13a3bf599
commit b5709b8171
8 changed files with 29 additions and 16 deletions

View File

@ -133,7 +133,8 @@ static int add_conflict(alpm_handle_t *handle, alpm_list_t **baddeps,
*/ */
static void check_conflict(alpm_handle_t *handle, static void check_conflict(alpm_handle_t *handle,
alpm_list_t *list1, alpm_list_t *list2, alpm_list_t *list1, alpm_list_t *list2,
alpm_list_t **baddeps, int order) { alpm_list_t **baddeps, int order)
{
alpm_list_t *i; alpm_list_t *i;
if(!baddeps) { if(!baddeps) {

View File

@ -314,7 +314,8 @@ int SYMEXPORT alpm_option_set_progresscb(alpm_handle_t *handle, alpm_cb_progress
return 0; return 0;
} }
static char *canonicalize_path(const char *path) { static char *canonicalize_path(const char *path)
{
char *new_path; char *new_path;
size_t len; size_t len;
@ -331,7 +332,7 @@ static char *canonicalize_path(const char *path) {
alpm_errno_t _alpm_set_directory_option(const char *value, alpm_errno_t _alpm_set_directory_option(const char *value,
char **storage, int must_exist) char **storage, int must_exist)
{ {
struct stat st; struct stat st;
char real[PATH_MAX]; char real[PATH_MAX];
const char *path; const char *path;

View File

@ -379,7 +379,8 @@ error:
* @return 0 on success, -1 on failure to properly decode * @return 0 on success, -1 on failure to properly decode
*/ */
static int decode_signature(const char *base64_data, static int decode_signature(const char *base64_data,
unsigned char **data, size_t *data_len) { unsigned char **data, size_t *data_len)
{
size_t len = strlen(base64_data); size_t len = strlen(base64_data);
unsigned char *usline = (unsigned char *)base64_data; unsigned char *usline = (unsigned char *)base64_data;
/* reasonable allocation of expected length is 3/4 of encoded length */ /* reasonable allocation of expected length is 3/4 of encoded length */

View File

@ -90,7 +90,8 @@ int config_free(config_t *oldconfig)
} }
/** Helper function for download_with_xfercommand() */ /** Helper function for download_with_xfercommand() */
static char *get_filename(const char *url) { static char *get_filename(const char *url)
{
char *filename = strrchr(url, '/'); char *filename = strrchr(url, '/');
if(filename != NULL) { if(filename != NULL) {
filename++; filename++;
@ -99,7 +100,8 @@ static char *get_filename(const char *url) {
} }
/** Helper function for download_with_xfercommand() */ /** Helper function for download_with_xfercommand() */
static char *get_destfile(const char *path, const char *filename) { static char *get_destfile(const char *path, const char *filename)
{
char *destfile; char *destfile;
/* len = localpath len + filename len + null */ /* len = localpath len + filename len + null */
size_t len = strlen(path) + strlen(filename) + 1; size_t len = strlen(path) + strlen(filename) + 1;
@ -110,7 +112,8 @@ static char *get_destfile(const char *path, const char *filename) {
} }
/** Helper function for download_with_xfercommand() */ /** Helper function for download_with_xfercommand() */
static char *get_tempfile(const char *path, const char *filename) { static char *get_tempfile(const char *path, const char *filename)
{
char *tempfile; char *tempfile;
/* len = localpath len + filename len + '.part' len + null */ /* len = localpath len + filename len + '.part' len + null */
size_t len = strlen(path) + strlen(filename) + 6; size_t len = strlen(path) + strlen(filename) + 6;
@ -122,7 +125,8 @@ static char *get_tempfile(const char *path, const char *filename) {
/** External fetch callback */ /** External fetch callback */
static int download_with_xfercommand(const char *url, const char *localpath, static int download_with_xfercommand(const char *url, const char *localpath,
int force) { int force)
{
int ret = 0, retval; int ret = 0, retval;
int usepart = 0; int usepart = 0;
int cwdfd; int cwdfd;

View File

@ -258,7 +258,8 @@ static void setuseragent(void)
* *
* @param ret the return value * @param ret the return value
*/ */
static void cleanup(int ret) { static void cleanup(int ret)
{
/* free alpm library resources */ /* free alpm library resources */
if(config->handle && alpm_release(config->handle) == -1) { if(config->handle && alpm_release(config->handle) == -1) {
pm_printf(ALPM_LOG_ERROR, "error releasing alpm library\n"); pm_printf(ALPM_LOG_ERROR, "error releasing alpm library\n");

View File

@ -130,7 +130,8 @@ int check_syncdbs(size_t need_repos, int check_valid)
} }
/* discard unhandled input on the terminal's input buffer */ /* discard unhandled input on the terminal's input buffer */
static int flush_term_input(int fd) { static int flush_term_input(int fd)
{
#ifdef HAVE_TCFLUSH #ifdef HAVE_TCFLUSH
if(isatty(fd)) { if(isatty(fd)) {
return tcflush(fd, TCIFLUSH); return tcflush(fd, TCIFLUSH);

View File

@ -28,7 +28,8 @@
alpm_handle_t *handle = NULL; alpm_handle_t *handle = NULL;
static void cleanup(int signum) { static void cleanup(int signum)
{
if(handle && alpm_release(handle) == -1) { if(handle && alpm_release(handle) == -1) {
fprintf(stderr, "error releasing alpm\n"); fprintf(stderr, "error releasing alpm\n");
} }
@ -64,7 +65,8 @@ static void checkpkgs(alpm_list_t *pkglist)
} }
} }
static void checkdbs(alpm_list_t *dbnames) { static void checkdbs(alpm_list_t *dbnames)
{
alpm_db_t *db = NULL; alpm_db_t *db = NULL;
alpm_list_t *i; alpm_list_t *i;
const alpm_siglevel_t level = ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL; const alpm_siglevel_t level = ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;
@ -82,7 +84,8 @@ static void checkdbs(alpm_list_t *dbnames) {
} }
static void usage(void) { static void usage(void)
{
fprintf(stderr, "usage:\n"); fprintf(stderr, "usage:\n");
fprintf(stderr, fprintf(stderr,
"\t%s [-b <pacman db>] core extra ... : check the listed sync databases\n", BASENAME); "\t%s [-b <pacman db>] core extra ... : check the listed sync databases\n", BASENAME);

View File

@ -178,7 +178,8 @@ static size_t strtrim(char *str)
return end - pch; return end - pch;
} }
static int register_syncs(void) { static int register_syncs(void)
{
FILE *fp; FILE *fp;
char *section = NULL; char *section = NULL;
char line[LINE_MAX]; char line[LINE_MAX];
@ -350,7 +351,7 @@ static void print_text(const char *pkg, const char *provision,
depth = depth->prev; depth = depth->prev;
} }
printf("%s", color->branch1); printf("%s", color->branch1);
while(depth->next){ while(depth->next) {
printf("%*s%-*s", style->indent * (depth->level - level), "", printf("%*s%-*s", style->indent * (depth->level - level), "",
style->indent, style->limb); style->indent, style->limb);
level = depth->level + 1; level = depth->level + 1;
@ -471,7 +472,7 @@ static void walk_deps(alpm_list_t *dblist, alpm_pkg_t *pkg, tdepth *depth, int r
}; };
depth->next = &d; depth->next = &d;
/* last dep, cut off the limb here */ /* last dep, cut off the limb here */
if(last){ if(last) {
if(depth->prev) { if(depth->prev) {
depth->prev->next = &d; depth->prev->next = &d;
d.prev = depth->prev; d.prev = depth->prev;