File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
libvisual-plugins/plugins/actor/lcdcontrol Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ static int ParseCpuinfo(void)
5555 return -1 ;
5656 }
5757 rewind (stream);
58- while (!feof (stream)) {
59- char buffer[256 ];
58+
59+ char buffer[256 ];
60+ while (fgets (buffer, sizeof (buffer), stream)) {
6061 char *c, *key, *val;
61- fgets (buffer, sizeof (buffer), stream);
6262 c = strchr (buffer, ' :' );
6363 if (c == NULL )
6464 continue ;
Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ int PluginMeminfo::ParseMeminfo()
5353 }
5454
5555 rewind (stream);
56- while (!feof (stream)) {
57- char buffer[256 ];
56+
57+ char buffer[256 ];
58+ while (fgets (buffer, sizeof (buffer), stream)) {
5859 char *c, *key, *val;
59- fgets (buffer, sizeof (buffer), stream);
6060 c = strchr (buffer, ' :' );
6161 if (c == NULL )
6262 continue ;
You can’t perform that action at this time.
0 commit comments