Bug #72 » fix5054112.patch
usr/src/lib/libnsl/nsl/t_error.c Wed Aug 18 23:52:33 2010 -0700 → usr/src/lib/libnsl/nsl/t_error.c Thu Aug 19 11:14:43 2010 +0200 | ||
---|---|---|
43 | 43 |
{ |
44 | 44 |
const char *c; |
45 | 45 |
int n; |
46 | ||
47 |
c = t_strerror(t_errno); |
|
46 |
int local_t_errno = t_errno; |
|
47 |
int local_errno = errno; |
|
48 |
|
|
49 |
c = t_strerror(local_t_errno); |
|
48 | 50 |
if (s != NULL && *s != '\0') { |
49 | 51 |
n = strlen(s); |
50 | 52 |
if (n) { |
... | ... | |
53 | 55 |
} |
54 | 56 |
} |
55 | 57 |
(void) write(2, c, (unsigned)strlen(c)); |
56 |
if (t_errno == TSYSERR) { |
|
58 |
if (local_t_errno == TSYSERR) {
|
|
57 | 59 |
(void) write(2, ": ", 2); |
58 |
perror(""); |
|
60 |
c = t_strerror(local_errno); |
|
61 |
if (s != NULL && *s != '\0') { |
|
62 |
n = strlen(s); |
|
63 |
if (n) { |
|
64 |
(void) write(2, s, (unsigned)n); |
|
65 |
(void) write(2, ": ", 2); |
|
66 |
} |
|
67 |
} |
|
59 | 68 |
} else |
60 | 69 |
(void) write(2, "\n", 1); |
61 | 70 |
return (0); |