summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-26 20:23:03 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-26 20:23:03 +0000
commitd77f8be80202edd28f3f2daaa8e4c14df67e1698 (patch)
treeecc948af3152e08d1125d731830503ca0ffe30f4 /lib/libalpm
parent7f46a9c44256c7c044bee5e75d95c3e9efc64f75 (diff)
downloadpacman-d77f8be80202edd28f3f2daaa8e4c14df67e1698.tar.xz
backport from pacman 2.9.5 (splitdep returns an int)
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/deps.c8
-rw-r--r--lib/libalpm/deps.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 2b117f2e..3e3bd267 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -460,13 +460,13 @@ PMList *checkdeps(pmdb_t *db, unsigned short op, PMList *packages)
return(baddeps);
}
-void splitdep(char *depstr, pmdepend_t *depend)
+int splitdep(char *depstr, pmdepend_t *depend)
{
char *str = NULL;
char *ptr = NULL;
if(depstr == NULL || depend == NULL) {
- return;
+ return(-1);
}
depend->mod = 0;
@@ -490,7 +490,7 @@ void splitdep(char *depstr, pmdepend_t *depend)
if(ptr == NULL) {
FREE(str);
- return;
+ return(0);
}
*ptr = '\0';
strncpy(depend->name, str, sizeof(depend->name));
@@ -501,7 +501,7 @@ void splitdep(char *depstr, pmdepend_t *depend)
strncpy(depend->version, ptr, sizeof(depend->version));
FREE(str);
- return;
+ return(0);
}
/* return a new PMList target list containing all packages in the original
diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h
index 3a895cbd..71af64be 100644
--- a/lib/libalpm/deps.h
+++ b/lib/libalpm/deps.h
@@ -26,7 +26,7 @@
PMList *sortbydeps(PMList *targets, int mode);
PMList *checkdeps(pmdb_t *db, unsigned short op, PMList *packages);
-void splitdep(char *depstr, pmdepend_t *depend);
+int splitdep(char *depstr, pmdepend_t *depend);
PMList *removedeps(pmdb_t *db, PMList *targs);
int resolvedeps(pmdb_t *local, PMList *databases, pmsync_t *sync, PMList *list, PMList *trail, PMList **data);