diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-06-10 18:39:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-06-10 18:39:59 +0000 |
commit | 87078193e81d61fb5c19de52bdf1db9a331120dd (patch) | |
tree | 0f8a67829febd9c1fd082965b94f7ea1b1b789c5 /usb.c | |
parent | 83c30b339bde284b38417ec2e44027f259be72ce (diff) | |
download | ldetect-87078193e81d61fb5c19de52bdf1db9a331120dd.tar ldetect-87078193e81d61fb5c19de52bdf1db9a331120dd.tar.gz ldetect-87078193e81d61fb5c19de52bdf1db9a331120dd.tar.bz2 ldetect-87078193e81d61fb5c19de52bdf1db9a331120dd.tar.xz ldetect-87078193e81d61fb5c19de52bdf1db9a331120dd.zip |
ensure the header file are C++ compliant (do not use "class" for struct field name)
Diffstat (limited to 'usb.c')
-rw-r--r-- | usb.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -29,10 +29,10 @@ extern struct pciusb_entries usb_probe(void) { fprintf(stderr, "%s %d: unknown ``P'' line\n", file, line); pciusb_initialize(e); } - } else if (e && buf[0] == 'I' && e->class == 0) { - int class, sub, prot = 0; - if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%02x Prot=%02x", &class, &sub, &prot) == 3) { - e->class = (class * 0x100 + sub) * 0x100 + prot; + } else if (e && buf[0] == 'I' && e->class_ == 0) { + int class_, sub, prot = 0; + if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%02x Prot=%02x", &class_, &sub, &prot) == 3) { + e->class_ = (class_ * 0x100 + sub) * 0x100 + prot; } else { fprintf(stderr, "%s %d: unknown ``I'' line\n", file, line); } |