lib/package_alternatives.c: fix style

This commit is contained in:
Enno Boland 2015-11-09 08:52:49 +01:00
parent 78e3bde269
commit 2927e58df2

View File

@ -60,8 +60,10 @@ right(const char *str)
} }
static const char * static const char *
normpath(char *path) { normpath(char *path)
{
char *seg, *p; char *seg, *p;
for (p = path, seg = NULL; *p; p++) { for (p = path, seg = NULL; *p; p++) {
if (strncmp(p, "/../", 4) == 0 || strncmp(p, "/..", 4) == 0) { if (strncmp(p, "/../", 4) == 0 || strncmp(p, "/..", 4) == 0) {
memmove(seg ? seg : p, p+3, strlen(p+3) + 1); memmove(seg ? seg : p, p+3, strlen(p+3) + 1);
@ -79,9 +81,11 @@ normpath(char *path) {
static char * static char *
relpath(char *from, char *to) { relpath(char *from, char *to)
{
int up; int up;
char *p = to, *rel; char *p = to, *rel;
assert(from[0] == '/'); assert(from[0] == '/');
assert(to[0] == '/'); assert(to[0] == '/');
normpath(from); normpath(from);