Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2013-01-03 18:48:52 -0300
committerAllan McRae <allan@archlinux.org>2013-01-04 21:49:37 +1000
commitb5709b8171c5be82ebb3651680ae3698b7513f43 (patch)
tree51993e70ae95ccecf0c74c5e82d45c4915421efa /src
parente13a3bf5990d03cca25c86efbfbaf2540d645413 (diff)
Fix open braces style
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/conf.c12
-rw-r--r--src/pacman/pacman.c3
-rw-r--r--src/pacman/util.c3
-rw-r--r--src/util/cleanupdelta.c9
-rw-r--r--src/util/pactree.c7
5 files changed, 22 insertions, 12 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 6ea7fe22..1bea2b0e 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -90,7 +90,8 @@ int config_free(config_t *oldconfig)
}
/** Helper function for download_with_xfercommand() */
-static char *get_filename(const char *url) {
+static char *get_filename(const char *url)
+{
char *filename = strrchr(url, '/');
if(filename != NULL) {
filename++;
@@ -99,7 +100,8 @@ static char *get_filename(const char *url) {
}
/** 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;
/* len = localpath len + filename len + null */
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() */
-static char *get_tempfile(const char *path, const char *filename) {
+static char *get_tempfile(const char *path, const char *filename)
+{
char *tempfile;
/* len = localpath len + filename len + '.part' len + null */
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 */
static int download_with_xfercommand(const char *url, const char *localpath,
- int force) {
+ int force)
+{
int ret = 0, retval;
int usepart = 0;
int cwdfd;
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index f293a5d1..f3ca8b97 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -258,7 +258,8 @@ static void setuseragent(void)
*
* @param ret the return value
*/
-static void cleanup(int ret) {
+static void cleanup(int ret)
+{
/* free alpm library resources */
if(config->handle && alpm_release(config->handle) == -1) {
pm_printf(ALPM_LOG_ERROR, "error releasing alpm library\n");
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 27e1f158..03063fb5 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -130,7 +130,8 @@ int check_syncdbs(size_t need_repos, int check_valid)
}
/* 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
if(isatty(fd)) {
return tcflush(fd, TCIFLUSH);
diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c
index eecb1aeb..144e0388 100644
--- a/src/util/cleanupdelta.c
+++ b/src/util/cleanupdelta.c
@@ -28,7 +28,8 @@
alpm_handle_t *handle = NULL;
-static void cleanup(int signum) {
+static void cleanup(int signum)
+{
if(handle && alpm_release(handle) == -1) {
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_list_t *i;
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,
"\t%s [-b <pacman db>] core extra ... : check the listed sync databases\n", BASENAME);
diff --git a/src/util/pactree.c b/src/util/pactree.c
index 9125f581..33cf66c4 100644
--- a/src/util/pactree.c
+++ b/src/util/pactree.c
@@ -178,7 +178,8 @@ static size_t strtrim(char *str)
return end - pch;
}
-static int register_syncs(void) {
+static int register_syncs(void)
+{
FILE *fp;
char *section = NULL;
char line[LINE_MAX];
@@ -350,7 +351,7 @@ static void print_text(const char *pkg, const char *provision,
depth = depth->prev;
}
printf("%s", color->branch1);
- while(depth->next){
+ while(depth->next) {
printf("%*s%-*s", style->indent * (depth->level - level), "",
style->indent, style->limb);
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;
/* last dep, cut off the limb here */
- if(last){
+ if(last) {
if(depth->prev) {
depth->prev->next = &d;
d.prev = depth->prev;