diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-10-14 00:38:28 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-10-14 00:38:28 +0000 |
commit | 0eae00d29128a2dbda34ee64c3198a598bc93203 (patch) | |
tree | ea4b8eb7290de5d98b52260547cb37750701b660 | |
parent | 9b69daf37005d064e0dfc0a1dc50b51a5c2314bb (diff) | |
download | perl-URPM-0eae00d29128a2dbda34ee64c3198a598bc93203.tar perl-URPM-0eae00d29128a2dbda34ee64c3198a598bc93203.tar.gz perl-URPM-0eae00d29128a2dbda34ee64c3198a598bc93203.tar.bz2 perl-URPM-0eae00d29128a2dbda34ee64c3198a598bc93203.tar.xz perl-URPM-0eae00d29128a2dbda34ee64c3198a598bc93203.zip |
as atoi() is able to figure out that '@' isn't a digit, there's no need for swapping it
-rw-r--r-- | URPM.xs | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1972,12 +1972,10 @@ Pkg_size(pkg) URPM::Package pkg CODE: if (pkg->info) { - char *s, *eos; + char *s; if ((s = strchr(pkg->info, '@')) != NULL && (s = strchr(s+1, '@')) != NULL) { - if ((eos = strchr(s+1, '@')) != NULL) *eos = 0; /* mark end of string to enable searching backwards */ RETVAL = atoi(s+1); - if (eos != NULL) *eos = '@'; } else { RETVAL = 0; } |