diff options
author | jbj <devnull@localhost> | 2003-04-02 21:16:26 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-04-02 21:16:26 +0000 |
commit | 95f01d39a57c3c3d8ebf80cfd78e67c550dc32e5 (patch) | |
tree | d8eaa0d6c4bb93c5c12a18a3e066de0d68e3aae2 /lib/misc.c | |
parent | 1f366d6a00d1cf8dc08a40fe789a1b68b4b80a5a (diff) | |
download | rpm-95f01d39a57c3c3d8ebf80cfd78e67c550dc32e5.tar.gz rpm-95f01d39a57c3c3d8ebf80cfd78e67c550dc32e5.tar.bz2 rpm-95f01d39a57c3c3d8ebf80cfd78e67c550dc32e5.zip |
Splint clean.
CVS patchset: 6729
CVS date: 2003/04/02 21:16:26
Diffstat (limited to 'lib/misc.c')
-rw-r--r-- | lib/misc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/misc.c b/lib/misc.c index 7bd6a15e2..f42c847a4 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -84,7 +84,9 @@ char ** splitString(const char * str, int length, char sep) list[i] = NULL; +/*@-nullret@*/ /* FIX: list[i] is NULL */ return list; +/*@=nullret@*/ } /*@=bounds@*/ @@ -346,11 +348,15 @@ if (_debug) fprintf(stderr, "*** GLOB maxb %d diskURL %d %*s globURL %p %s\n", (int)maxb, (int)nb, (int)nb, av[j], globURL, globURL); /*@-branchstate@*/ +#ifdef DYING if (argc == 0) argv = xmalloc((gl.gl_pathc+1) * sizeof(*argv)); else if (gl.gl_pathc > 0) +#endif argv = xrealloc(argv, (argc+gl.gl_pathc+1) * sizeof(*argv)); /*@=branchstate@*/ + + if (argv != NULL) for (i = 0; i < gl.gl_pathc; i++) { const char * globFile = &(gl.gl_pathv[i][0]); if (globRoot > globURL && globRoot[-1] == '/') @@ -378,12 +384,16 @@ fprintf(stderr, "*** rpmGlob argv[%d] \"%s\"\n", argc, globURL); exit: av = _free(av); +/*@-branchstate@*/ if (rc || argvPtr == NULL) { +/*@-dependenttrans -unqualifiedtrans@*/ if (argv != NULL) for (i = 0; i < argc; i++) argv[i] = _free(argv[i]); argv = _free(argv); +/*@=dependenttrans =unqualifiedtrans@*/ } +/*@=branchstate@*/ return rc; } |