diff options
| author | Toomas Soome <tsoome@me.com> | 2019-01-22 10:32:13 +0200 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2019-07-03 10:24:54 +0300 |
| commit | 80b16b99c7741070ef99a31d2582279f38ee5d15 (patch) | |
| tree | a31da92fdfcbcc3c30bb7b00ab321c7992134c63 /usr/src/lib/libfru | |
| parent | 03d5549b0a65247d3749887869b20aeeae3eb5e6 (diff) | |
| download | illumos-joyent-80b16b99c7741070ef99a31d2582279f38ee5d15.tar.gz | |
11137 libfruraw: NULL pointer errors
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/lib/libfru')
| -rw-r--r-- | usr/src/lib/libfru/libfruraw/fruraw.c | 2 | ||||
| -rw-r--r-- | usr/src/lib/libfru/libfruraw/raw_access.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/lib/libfru/libfruraw/fruraw.c b/usr/src/lib/libfru/libfruraw/fruraw.c index b131c0a993..39d341486b 100644 --- a/usr/src/lib/libfru/libfruraw/fruraw.c +++ b/usr/src/lib/libfru/libfruraw/fruraw.c @@ -124,7 +124,7 @@ frt_initialize(int num, char **args) } g_raw->cont = open_raw_data(g_raw); - if (g_raw->cont == NULL) { + if (g_raw->cont == 0) { return (FRU_FAILURE); } diff --git a/usr/src/lib/libfru/libfruraw/raw_access.c b/usr/src/lib/libfru/libfruraw/raw_access.c index 1962f96dda..7c1d2077e1 100644 --- a/usr/src/lib/libfru/libfruraw/raw_access.c +++ b/usr/src/lib/libfru/libfruraw/raw_access.c @@ -33,7 +33,7 @@ #pragma init(initialize_raw_access) static hash_obj_t *hash_table[TABLE_SIZE]; -extern raw_list_t *g_raw; +extern raw_list_t *g_raw; static void initialize_raw_access(void) @@ -1098,7 +1098,7 @@ open_raw_data(raw_list_t *node) cont_hash_obj = create_container_hash_object(); if (cont_hash_obj == NULL) { - return (NULL); + return (0); } add_hashobject_to_hashtable(cont_hash_obj); @@ -1122,7 +1122,7 @@ open_raw_data(raw_list_t *node) } if (retval < 0) { - return (NULL); + return (0); } cont_hash_obj->u.cont_obj->num_of_section = cont_info.num_sections; @@ -1131,7 +1131,7 @@ open_raw_data(raw_list_t *node) for (count = 0; count < cont_info.num_sections; count++) { sec_hash_obj = create_section_hash_object(); if (sec_hash_obj == NULL) { - return (NULL); + return (0); } add_hashobject_to_hashtable(sec_hash_obj); |
