summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-20 05:18:26 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-20 05:18:26 +0000
commitdb7c17d71cacfc5af407f4e30ddbc409ecd03112 (patch)
tree1cb761c6c0dc1bbf9223f465a115416edfa3aa7e /os2
parent0c1a8ec7bddcb61a4b45cf947cb375e7d350aaa6 (diff)
downloadperl-db7c17d71cacfc5af407f4e30ddbc409ecd03112.tar.gz
various little nits
p4raw-id: //depot/perl@3436
Diffstat (limited to 'os2')
-rw-r--r--os2/os2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/os2/os2.c b/os2/os2.c
index 3103012df2..7f011f7fea 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -1240,10 +1240,12 @@ settmppath()
if (!p) return;
len = strlen(p);
tpath = (char *)malloc(len + strlen(TMPPATH1) + 2);
- strcpy(tpath, p);
- tpath[len] = '/';
- strcpy(tpath + len + 1, TMPPATH1);
- tmppath = tpath;
+ if (tpath) {
+ strcpy(tpath, p);
+ tpath[len] = '/';
+ strcpy(tpath + len + 1, TMPPATH1);
+ tmppath = tpath;
+ }
}
#include "XSUB.h"