diff options
author | jkim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
commit | 8e9a373708032aaf58694e237e3889d7d3fd796f (patch) | |
tree | e05da15a04629f6e36af5ca6c81a2efda47a9dc3 /source/compiler/asloperands.c | |
parent | 7aca7201724cb02a2a0541bd3ad2c0aca23dd076 (diff) | |
download | FreeBSD-src-8e9a373708032aaf58694e237e3889d7d3fd796f.zip FreeBSD-src-8e9a373708032aaf58694e237e3889d7d3fd796f.tar.gz |
Import ACPICA 20130725.
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 deb4bd4..4afbd96 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] = '_'; } } } |