mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Refactor newline handling in servlist.c
Remove redundant newline character handling in fgets buffer.
This commit is contained in:
committed by
GitHub
parent
24a5c3b50d
commit
7df9b08313
@@ -990,11 +990,10 @@ servlist_load (void)
|
||||
|
||||
while (fgets (buf, sizeof (buf) - 2, fp))
|
||||
{
|
||||
g_strchomp (buf);
|
||||
len = strlen (buf);
|
||||
if (!len)
|
||||
continue;
|
||||
buf[len] = 0;
|
||||
buf[len-1] = 0; /* remove the trailing \n */
|
||||
if (net)
|
||||
{
|
||||
switch (buf[0])
|
||||
|
||||
Reference in New Issue
Block a user