fixed run_command()
This commit is contained in:
parent
cc1bb3a344
commit
5a70f920f0
1 changed files with 2 additions and 2 deletions
|
@ -407,8 +407,8 @@ run_command(const char *cmd)
|
||||||
warn("Failed to get command output for %s", cmd);
|
warn("Failed to get command output for %s", cmd);
|
||||||
return smprintf(UNKNOWN_STR);
|
return smprintf(UNKNOWN_STR);
|
||||||
}
|
}
|
||||||
fgets(buf, sizeof(buf), fp);
|
fgets(buf, sizeof(buf)-1, fp);
|
||||||
buf[sizeof(buf)-1] = '\0';
|
buf[strlen(buf)-1] = '\0';
|
||||||
pclose(fp);
|
pclose(fp);
|
||||||
|
|
||||||
return smprintf("%s", buf);
|
return smprintf("%s", buf);
|
||||||
|
|
Loading…
Reference in a new issue