src/config.c
changeset 47 a689b6a8e6ed
parent 36 6889aacd038e
child 51 5d9aed3948a6
equal deleted inserted replaced
46:08ad49ca1b4e 47:a689b6a8e6ed
    44      */
    44      */
    45     uc->nick = uc->pass = uc->server = uc->channel = uc->topic = NULL;
    45     uc->nick = uc->pass = uc->server = uc->channel = uc->topic = NULL;
    46     uc->port = 6667;
    46     uc->port = 6667;
    47 
    47 
    48     while (!feof (f)) {
    48     while (!feof (f)) {
    49         (void)fgets (buffer, sizeof (buffer), f);
    49         if (fgets (buffer, sizeof (buffer), f) == NULL)
       
    50             break;
    50         token = buffer;
    51         token = buffer;
    51 
    52 
    52         while (*token == '\t')  /* Eat trailing tabs */
    53         while (*token == '\t')  /* Eat trailing tabs */
    53             token++;
    54             token++;
    54         while (*token == ' ')   /* Eat trailing whitespaces */
    55         while (*token == ' ')   /* Eat trailing whitespaces */