Fixes and improves parsing of config file.
[lcr.git] / gsm_conf.c
index 9957b86..082a6ed 100644 (file)
@@ -47,10 +47,8 @@ int gsm_conf(struct gsm_conf *gsm_conf)
        }
 
        line=0;
        }
 
        line=0;
-       while((fgets(buffer,sizeof(buffer),fp))) {
+       while((GETLINE(buffer, fp))) {
                line++;
                line++;
-               buffer[sizeof(buffer)-1]=0;
-               if (buffer[0]) buffer[strlen(buffer)-1]=0;
                p=buffer;
 
                while(*p <= 32) { /* skip spaces */
                p=buffer;
 
                while(*p <= 32) { /* skip spaces */