[pacman-dev] [PATCH] Change the exit code for pacman_deptest() and some clean up.

Xavier shiningxc at gmail.com
Thu Jun 28 19:57:55 EDT 2007


2007/6/29, Andrew Fyfe <andrew at neptune-one.net>:
> -       newstr = strdup(depstring);
> +
> +       newstr = calloc(strlen(depstring)+1, sizeof(char));
> +       strncpy(newstr, depstring, strlen(depstring));
>

hmm, that's basically the same, isn't it? :)

> -
> -               /* splitdep modifies the string... we'll compensate for now */
> -               char *saved_target = NULL;
> -               saved_target = calloc(strlen(target)+1, sizeof(char));
> -               strncpy(saved_target, target, strlen(target));
> -

Wow, now I'm confused, I didn't know about this code.
I'm afraid I only looked at the backend code, and not frontend, when
Dan asked this :
http://www.archlinux.org/pipermail/pacman-dev/2007-June/008595.html

Was that a workaround for a feature or for a bug ?
commit is there :
http://projects.archlinux.org/git/gitweb.cgi?p=pacman.git;a=commitdiff;h=6f870968edd09479410f3a6a52bb0be75e327366
Any reasons this wasn't directly made in splitdep instead, like Nagy did :
http://www.archlinux.org/pipermail/pacman-dev/2007-June/008535.html ?

It really looked like a bug to me, but this workaround confuses me.




More information about the pacman-dev mailing list