summaryrefslogtreecommitdiffstats
path: root/usb.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-06-10 18:39:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-06-10 18:39:59 +0000
commit87078193e81d61fb5c19de52bdf1db9a331120dd (patch)
tree0f8a67829febd9c1fd082965b94f7ea1b1b789c5 /usb.c
parent83c30b339bde284b38417ec2e44027f259be72ce (diff)
downloadldetect-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usb.c b/usb.c
index 84b54d5..4ecf398 100644
--- a/usb.c
+++ b/usb.c
@@ -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);
}