Changeset 4861
- Timestamp:
- 09/23/07 23:23:12 (6 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
lib/proc.c (modified) (3 diffs)
-
prog/dump/i2cbusses.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/lib/proc.c
r4751 r4861 94 94 if (strlen(line) > 0) 95 95 line[strlen(line)-1] = '\0'; 96 if (! (border = rindex(line,'\t')))96 if (! (border = strrchr(line,'\t'))) 97 97 goto ERROR; 98 98 /* Skip algorithm name */ 99 99 *border='\0'; 100 if (! (border = rindex(line,'\t')))100 if (! (border = strrchr(line,'\t'))) 101 101 goto ERROR; 102 102 if (! (entry.adapter = strdup(border + 1))) 103 103 goto FAT_ERROR; 104 104 *border='\0'; 105 if (! (border = rindex(line,'\t')))105 if (! (border = strrchr(line,'\t'))) 106 106 goto ERROR; 107 107 *border='\0'; … … 156 156 strcat(n, "/"); 157 157 strcpy(altn, n); 158 /* use rindexto append sysname to n */159 getsysname(the_feature, rindex(n, '\0'), &mag, rindex(altn, '\0'));158 /* use strrchr to append sysname to n */ 159 getsysname(the_feature, strrchr(n, '\0'), &mag, strrchr(altn, '\0')); 160 160 if ((f = fopen(n, "r")) != NULL 161 161 || (f = fopen(altn, "r")) != NULL) { … … 199 199 strcat(n, "/"); 200 200 strcpy(altn, n); 201 /* use rindexto append sysname to n */202 getsysname(the_feature, rindex(n, '\0'), &mag, rindex(altn, '\0'));201 /* use strrchr to append sysname to n */ 202 getsysname(the_feature, strrchr(n, '\0'), &mag, strrchr(altn, '\0')); 203 203 if ((f = fopen(n, "w")) != NULL 204 204 || (f = fopen(altn, "w")) != NULL) { -
lm-sensors/trunk/prog/dump/i2cbusses.c
r4432 r4861 186 186 continue; 187 187 } 188 if((border = index(x, '\n')) != NULL)188 if((border = strchr(x, '\n')) != NULL) 189 189 *border = 0; 190 190 if(count++ == 0 && !procfmt)
