Refactor newline handling in servlist.c

Remove redundant newline character handling in fgets buffer.
This commit is contained in:
deepend-tildeclub
2026-01-15 11:12:56 -07:00
committed by GitHub
parent 24a5c3b50d
commit 7df9b08313

View File

@@ -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])