1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
Index: b/usr/src/lib/libproc/common/Pcore.c
===================================================================
--- a/usr/src/lib/libproc/common/Pcore.c 2014-04-07 17:51:12.395902248 +0400
+++ b/usr/src/lib/libproc/common/Pcore.c 2014-04-07 17:51:16.555133202 +0400
@@ -1641,7 +1641,7 @@
uint_t i, pagemask;
size_t nphdrs;
- rlp->rl_data_base = NULL;
+ rlp->rl_data_base = 0;
/*
* Find the first loadable, writeable Phdr and compute rl_data_base
@@ -1665,7 +1665,7 @@
* If we didn't find an appropriate phdr or if the address we
* computed has no mapping, return NULL.
*/
- if (rlp->rl_data_base == NULL ||
+ if (rlp->rl_data_base == 0 ||
(mp = Paddr2mptr(P, rlp->rl_data_base)) == NULL)
return (NULL);
Index: b/usr/src/lib/libproc/common/Pexecname.c
===================================================================
--- a/usr/src/lib/libproc/common/Pexecname.c 2014-04-07 17:51:12.395725490 +0400
+++ b/usr/src/lib/libproc/common/Pexecname.c 2014-04-07 17:51:16.556905514 +0400
@@ -180,7 +180,7 @@
* Fourth try: read the string pointed to by argv[0] out of the
* stack in the process's address space.
*/
- if (P->psinfo.pr_argv != NULL &&
+ if (P->psinfo.pr_argv != 0 &&
Pread(P, &addr, sizeof (addr), P->psinfo.pr_argv) != -1 &&
Pread_string(P, path, sizeof (path), (off_t)addr) > 0) {
Index: b/usr/src/lib/libproc/common/Psymtab.c
===================================================================
--- a/usr/src/lib/libproc/common/Psymtab.c 2014-04-07 17:51:12.395783522 +0400
+++ b/usr/src/lib/libproc/common/Psymtab.c 2014-04-07 17:51:16.560644834 +0400
@@ -624,7 +624,7 @@
* section.
*/
if (fptr != NULL && fptr->file_lo != NULL &&
- (fptr->file_lo->rl_data_base == NULL ||
+ (fptr->file_lo->rl_data_base == 0 ||
pmp->pr_vaddr + pmp->pr_size <=
fptr->file_lo->rl_data_base))
return (pmp);
@@ -3114,7 +3114,7 @@
nenv = 0;
}
- if ((envoff = envp[nenv++]) == NULL)
+ if ((envoff = envp[nenv++]) == 0)
break;
/*
Index: b/usr/src/lib/libproc/common/Psymtab_machelf32.c
===================================================================
--- a/usr/src/lib/libproc/common/Psymtab_machelf32.c 2014-04-07 17:51:12.395828124 +0400
+++ b/usr/src/lib/libproc/common/Psymtab_machelf32.c 2014-04-07 17:51:16.562608908 +0400
@@ -254,7 +254,7 @@
uint_t i;
Off off;
size_t pltsz = 0, pltentries = 0;
- uintptr_t hptr = NULL;
+ uintptr_t hptr = 0;
Word hnchains, hnbuckets;
if (ehdr->e_type == ET_DYN)
Index: b/usr/src/lib/libproc/common/Pstack.c
===================================================================
--- a/usr/src/lib/libproc/common/Pstack.c 2014-04-07 17:51:12.395590428 +0400
+++ b/usr/src/lib/libproc/common/Pstack.c 2014-04-07 17:51:16.564071630 +0400
@@ -176,7 +176,7 @@
uint_t new_size, i;
ucontext_t uc;
- if (addr == NULL)
+ if (addr == 0)
return (0);
for (;;) {
@@ -214,7 +214,7 @@
* entry which could indicate a cycle or a very peculiar
* interference pattern between threads.
*/
- if (addr == NULL)
+ if (addr == 0)
break;
for (i = 0; i < ucl->uc_nelems - 1; i++) {
Index: b/usr/src/lib/libproc/i386/Pisadep.c
===================================================================
--- a/usr/src/lib/libproc/i386/Pisadep.c 2014-04-07 17:51:12.395962469 +0400
+++ b/usr/src/lib/libproc/i386/Pisadep.c 2014-04-07 17:51:16.565726579 +0400
@@ -258,9 +258,9 @@
if (find_uclink(&ucl, pfp + sizeof (sf_t)))
uc_addr = pfp + sizeof (sf_t);
else
- uc_addr = NULL;
+ uc_addr = 0;
- if (uc_addr != NULL &&
+ if (uc_addr != 0 &&
Pread(P, &uc, sizeof (uc), uc_addr) == sizeof (uc)) {
ucontext_n_to_prgregs(&uc, gregs);
|