diff options
| author | jdennis <jdennis@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-11-19 20:57:35 +0000 |
|---|---|---|
| committer | jdennis <jdennis@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-11-19 20:57:35 +0000 |
| commit | cf598ddab99d66ce6fedc6eb69e5b83aaa657475 (patch) | |
| tree | 50da07402b335d670ab0f92e9c07554f1517074e /pki/base/silent/src/http/HTTPClient.java | |
| parent | 36949184818db83bedac6aa58baeeeb23d5b3821 (diff) | |
Fix set/get library path
set_library_path() and get_library_path() were both producing warnings
from Perl about the use of uninitialized variables. This occurred
because get_library_path() returned the value of the LD_LIBRARY_PATH
environment variable, which if it is not set in the envronment is the
undef value. Then the caller of get_library_path() would use the
result to build a new string to use as a new library path. But the use
of undef in the string concatentation was producing warnings. Finally
the caller would reset the library path to what had been orginally
returned by get_library_path(), which set LD_LIBRARY_PATH in %ENV to
the undef value, which is probaly not the best idea, although legal.
To fix this every routine which called get_library_path() would need
to check for undef value as it builds a new replacement path, that's a
lot of code to add in a lot of places.
Instead set_library_path() was modified, instead of accepting a string
containing a new path, it now accepts an array of path values. It
iterates over the array discarding any undef values in the array and
builds a path string from the defined values. This simplifed the
callers of get_library_path() and set_library_path(). It also had the
nice property that if get_library_path() initially returned undef then
subsequently calling set_library_path() with that value produces an
empty string for storing into %ENV which preferable to storing undef.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1562 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/silent/src/http/HTTPClient.java')
0 files changed, 0 insertions, 0 deletions
