Print this page
OS-2444 richmond hardware maps need to support ivy bridge (review fixes)

*** 68,84 **** if (input != NULL) { /* * Start scanning at beginning of input: */ scanstart = input; ! } else { /* * If we have already finished scanning, return NULL. */ - if (*lastp == NULL) return (NULL); ! /* * Otherwise, start scanning where we left off: */ scanstart = *lastp; } --- 68,83 ---- if (input != NULL) { /* * Start scanning at beginning of input: */ scanstart = input; ! } else if (*lastp == NULL) { /* * If we have already finished scanning, return NULL. */ return (NULL); ! } else { /* * Otherwise, start scanning where we left off: */ scanstart = *lastp; }
*** 89,99 **** * We still have a separator, so advance the next-start * pointer past it: */ *lastp = token + seplen; /* ! * Copy out this element: */ ret = topo_hdl_alloc(hdl, token - scanstart + 1); (void) strncpy(ret, scanstart, token - scanstart); ret[token - scanstart] = '\0'; } else { --- 88,100 ---- * We still have a separator, so advance the next-start * pointer past it: */ *lastp = token + seplen; /* ! * Copy out this element. The buffer must fit the string ! * exactly, so that topo_hdl_strfree() can determine its ! * size with strlen(). */ ret = topo_hdl_alloc(hdl, token - scanstart + 1); (void) strncpy(ret, scanstart, token - scanstart); ret[token - scanstart] = '\0'; } else {