Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/package.c8
-rw-r--r--src/pacman/sync.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index ade6f5dc..bb510838 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -222,11 +222,11 @@ int split_pkgname(char *target, char *name, char *version)
strncpy(tmp, p, 512);
/* trim file extension (if any) */
if((p = strstr(tmp, PM_EXT_PKG))) {
- *p = 0;
+ *p = '\0';
}
/* trim architecture */
- if((p = strrchr(tmp, '-'))) {
- *p = 0;
+ if((p = _alpm_pkgname_has_arch(tmp))) {
+ *p = '\0';
}
p = tmp + strlen(tmp);
@@ -240,7 +240,7 @@ int split_pkgname(char *target, char *name, char *version)
return(-1);
}
strncpy(version, p+1, 64);
- *p = 0;
+ *p = '\0';
strncpy(name, tmp, 256);
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 5c6c7ac5..c4932e89 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -214,7 +214,7 @@ static int sync_search(list_t *syncs, list_t *targets)
(char *)alpm_pkg_getinfo(pkg, PM_PKG_VERSION),
(group ? " (" : ""), (group ? group : ""), (group ? ") " : ""));
indentprint((char *)alpm_pkg_getinfo(pkg, PM_PKG_DESC), 4);
- printf("\n");
+ printf("\n\n");
}
alpm_list_free_outer(ret);
} else {