parser: Strip trailing whitespace

This commit is contained in:
Michal Suchanek committed 2024-01-06 20:26:05 +01:00
1 parent 6b5a19b708
commit 0c097bfca4
2 files changed
+19 -19

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
%{
/*
conf-lex.l - Part of libsensors, a Linux library for reading sensor data.
Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -245,7 +245,7 @@ ignore{BLANK}* {
if (! sensors_yylval.name)
sensors_fatal_error("conf-lex.l",
"Allocating a new string");
return NAME;
}
@@ -296,7 +296,7 @@ ignore{BLANK}* {
BEGIN(ERR);
return ERROR;
}
\" {
buffer_add_char("\0");
sensors_yylval.name = strdup(buffer);