summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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);