[pacman-dev] [PATCH 1/3] Fix whitespace in pacsort.c and pactree.c
Jason St. John
jstjohn at purdue.edu
Sun Jul 21 21:09:57 EDT 2013
Replace spaces with tabs.
Remove extra spaces.
Signed-off-by: Jason St. John <jstjohn at purdue.edu>
---
src/util/pacsort.c | 20 ++++++++++----------
src/util/pactree.c | 20 ++++++++++----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/util/pacsort.c b/src/util/pacsort.c
index 50b9c65..7c551c2 100644
--- a/src/util/pacsort.c
+++ b/src/util/pacsort.c
@@ -26,7 +26,7 @@
#include <alpm.h>
-#define DELIM ' '
+#define DELIM ' '
struct buffer_t {
char *mem;
@@ -52,21 +52,21 @@ static struct options_t {
/* A quick and dirty implementation derived from glibc */
static size_t strnlen(const char *s, size_t max)
{
- register const char *p;
- for(p = s; *p && max--; ++p);
- return (p - s);
+ register const char *p;
+ for(p = s; *p && max--; ++p);
+ return (p - s);
}
char *strndup(const char *s, size_t n)
{
- size_t len = strnlen(s, n);
- char *new = (char *) malloc(len + 1);
+ size_t len = strnlen(s, n);
+ char *new = (char *) malloc(len + 1);
- if(new == NULL)
- return NULL;
+ if(new == NULL)
+ return NULL;
- new[len] = '\0';
- return (char *)memcpy(new, s, len);
+ new[len] = '\0';
+ return (char *)memcpy(new, s, len);
}
#endif
diff --git a/src/util/pactree.c b/src/util/pactree.c
index 33cf66c..2cba1b0 100644
--- a/src/util/pactree.c
+++ b/src/util/pactree.c
@@ -125,21 +125,21 @@ const char *configfile = CONFFILE;
/* A quick and dirty implementation derived from glibc */
static size_t strnlen(const char *s, size_t max)
{
- register const char *p;
- for(p = s; *p && max--; ++p);
- return (p - s);
+ register const char *p;
+ for(p = s; *p && max--; ++p);
+ return (p - s);
}
char *strndup(const char *s, size_t n)
{
- size_t len = strnlen(s, n);
- char *new = (char *) malloc(len + 1);
+ size_t len = strnlen(s, n);
+ char *new = (char *) malloc(len + 1);
- if(new == NULL)
- return NULL;
+ if(new == NULL)
+ return NULL;
- new[len] = '\0';
- return (char *)memcpy(new, s, len);
+ new[len] = '\0';
+ return (char *)memcpy(new, s, len);
}
#endif
@@ -362,7 +362,7 @@ static void print_text(const char *pkg, const char *provision,
/* print tip */
if(!pkg && provision) {
- printf("%s%s%s%s [unresolvable]%s\n", tip, color->leaf1,
+ printf("%s%s%s%s [unresolvable]%s\n", tip, color->leaf1,
provision, color->branch1, color->off);
} else if(provision && strcmp(pkg, provision) != 0) {
printf("%s%s%s%s%s %s%s%s\n", tip, color->leaf1, pkg,
--
1.8.3.3
More information about the pacman-dev
mailing list