Skip to content

Commit 0b09516

Browse files
authored
Fix missing parameter in popen call
1 parent 6ba30e2 commit 0b09516

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpuid_power.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ int detect(void){
136136
char buffer[512], *p;
137137

138138
p = (char *)NULL;
139-
infile = popen("prtconf|grep 'Processor Type'");
139+
infile = popen("prtconf|grep 'Processor Type'", "r");
140140
while (fgets(buffer, sizeof(buffer), infile)){
141141
if (!strncmp("Pro", buffer, 3)){
142142
p = strchr(buffer, ':') + 2;

0 commit comments

Comments
 (0)