diff mbox

osm_subnet.c change void* arithmetic to char*

Message ID 3F6F638B8D880340AB536D29CD4C1E1912C86E8A99@orsmsx501.amr.corp.intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Smith, Stan Oct. 1, 2009, 9:38 p.m. UTC
None
diff mbox

Patch

--- a/opensm/opensm/osm_subnet.c        2009-10-01 12:45:52.000000000 -0700
+++ b/opensm/opensm/osm_subnet.c        2009-10-01 14:24:18.000000000 -0700
@@ -1193,8 +1193,8 @@ 
                        if (strcmp(r->name, p_key))
                                continue;

-                       p_field1 = (void *)p_opts->file_opts + r->opt_offset;
-                       p_field2 = (void *)p_opts + r->opt_offset;
+                       p_field1 = (char *)p_opts->file_opts + r->opt_offset;
+                       p_field2 = (char *)p_opts + r->opt_offset;
                        /* don't call setup function first time */
                        r->parse_fn(NULL, p_key, p_val, p_field1, p_field2,
                                    NULL);
@@ -1253,8 +1253,8 @@ 
                        if (!r->can_update || strcmp(r->name, p_key))
                                continue;

-                       p_field1 = (void *)p_opts->file_opts + r->opt_offset;
-                       p_field2 = (void *)p_opts + r->opt_offset;
+                       p_field1 = (char *)p_opts->file_opts + r->opt_offset;
+                       p_field2 = (char *)p_opts + r->opt_offset;
                        r->parse_fn(p_subn, p_key, p_val, p_field1, p_field2,
                                    r->setup_fn);
                        break;