diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2005-03-26 21:23:03 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-03-26 21:23:03 +0100 |
commit | d77f8be80202edd28f3f2daaa8e4c14df67e1698 (patch) | |
tree | ecc948af3152e08d1125d731830503ca0ffe30f4 /lib/libalpm/deps.c | |
parent | 7f46a9c44256c7c044bee5e75d95c3e9efc64f75 (diff) | |
download | pacman-d77f8be80202edd28f3f2daaa8e4c14df67e1698.tar.gz pacman-d77f8be80202edd28f3f2daaa8e4c14df67e1698.tar.xz |
backport from pacman 2.9.5 (splitdep returns an int)
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r-- | lib/libalpm/deps.c | 8 |
1 files changed, 4 insertions, 4 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 |