瀏覽代碼

fixed run_command()

master
Aaron Marcher 8 年之前
父節點
當前提交
5a70f920f0
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 74B048E5C2474F9A
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      slstatus.c

+ 2
- 2
slstatus.c 查看文件

@@ -407,8 +407,8 @@ run_command(const char *cmd)
warn("Failed to get command output for %s", cmd);
return smprintf(UNKNOWN_STR);
}
fgets(buf, sizeof(buf), fp);
buf[sizeof(buf)-1] = '\0';
fgets(buf, sizeof(buf)-1, fp);
buf[strlen(buf)-1] = '\0';
pclose(fp);

return smprintf("%s", buf);


Loading…
取消
儲存