]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/kconfig/zconf.l
hwmon: (lm85) Coding-style cleanups
[linux-2.6-omap-h63xx.git] / scripts / kconfig / zconf.l
index cfa46077c6b43a45dad6d89c60ea5dd274c566cf..4cea5c85cd0a9297f029d58cf97c4771825f4641 100644 (file)
@@ -217,6 +217,11 @@ n  [A-Za-z0-9_]
                append_string("\n", 1);
        }
        [^ \t\n].* {
+               while (yyleng) {
+                       if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t'))
+                               break;
+                       yyleng--;
+               }
                append_string(yytext, yyleng);
                if (!first_ts)
                        first_ts = last_ts;
@@ -265,7 +270,7 @@ FILE *zconf_fopen(const char *name)
        FILE *f;
 
        f = fopen(name, "r");
-       if (!f && name[0] != '/') {
+       if (!f && name != NULL && name[0] != '/') {
                env = getenv(SRCTREE);
                if (env) {
                        sprintf(fullname, "%s/%s", env, name);