diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
commit | dbded195f9840f9044a6828c8877c6bf0a956482 (patch) | |
tree | e05da15a04629f6e36af5ca6c81a2efda47a9dc3 /source/compiler/asloperands.c | |
parent | 94c37fb2483cc09856a30e74879a69f2ccfe22f0 (diff) |
Notes
Diffstat (limited to 'source/compiler/asloperands.c')
-rw-r--r-- | source/compiler/asloperands.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c index deb4bd4cba50..4afbd9629042 100644 --- a/source/compiler/asloperands.c +++ b/source/compiler/asloperands.c @@ -971,12 +971,15 @@ OpnDoDefinitionBlock ( Gbl_TableId = AcpiOsAllocate (Length + 1); ACPI_STRCPY (Gbl_TableId, Child->Asl.Value.String); + /* + * Convert anything non-alphanumeric to an underscore. This + * allows us to use the TableID to generate unique C symbols. + */ for (i = 0; i < Length; i++) { - if (Gbl_TableId[i] == ' ') + if (!isalnum ((int) Gbl_TableId[i])) { - Gbl_TableId[i] = 0; - break; + Gbl_TableId[i] = '_'; } } } |