mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-21 14:33:55 +00:00
Merge pull request #36 from pocographdotcom/master
Cannot read config file properly.
This commit is contained in:
+2
-2
@@ -76,8 +76,8 @@ jconf_t *read_jconf(const char* file)
|
||||
buf = malloc(pos + 1);
|
||||
if (buf == NULL) FATAL("No enough memory.");
|
||||
|
||||
int err = fread(buf, pos, 1, f);
|
||||
if (err) FATAL("Failed to read the config file.");
|
||||
int nread = fread(buf, pos, 1, f);
|
||||
if (!nread) FATAL("Failed to read the config file.");
|
||||
fclose(f);
|
||||
|
||||
buf[pos] = '\0'; // end of string
|
||||
|
||||
Reference in New Issue
Block a user