diff options
author | David Sommerseth <davids@redhat.com> | 2009-04-09 11:49:50 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-04-29 11:22:11 +0200 |
commit | 581b015c91a3b364b1c1324bed775bfd2ce99dbd (patch) | |
tree | 73480a5c6ad37739af13ba5605d40d858c4c288e /src/dmidecode.c | |
parent | 612445e94781f14af65490b52c898b9eaa5f5e85 (diff) | |
download | python-dmidecode-581b015c91a3b364b1c1324bed775bfd2ce99dbd.tar.gz python-dmidecode-581b015c91a3b364b1c1324bed775bfd2ce99dbd.tar.xz python-dmidecode-581b015c91a3b364b1c1324bed775bfd2ce99dbd.zip |
Made it compile
Diffstat (limited to 'src/dmidecode.c')
-rw-r--r-- | src/dmidecode.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/dmidecode.c b/src/dmidecode.c index 773a673..c146969 100644 --- a/src/dmidecode.c +++ b/src/dmidecode.c @@ -86,11 +86,6 @@ #define EFI_NOT_FOUND (-1) #define EFI_NO_SMBIOS (-2) -static const char *out_of_spec = "<OUT OF SPEC>"; -static const char *bad_index = "<BAD INDEX>"; - -#define BAD_INDEX PyString_FromString("<BAD INDEX>") -#define OUT_OF_SPEC PyString_FromString("<OUT OF SPEC>") /******************************************************************************* ** Type-independant Stuff @@ -112,7 +107,7 @@ const char *dmi_string(const struct dmi_header *dm, u8 s) } if(!*bp) - return bad_index; + return NULL; /* ASCII filtering */ len = strlen(bp); @@ -233,7 +228,7 @@ void dmi_dump(xmlNode *node, struct dmi_header * h) if((h->data)[h->length] || (h->data)[h->length + 1]) { i = 1; - while((s = dmi_string(h, i++)) != bad_index) { + while((s = dmi_string(h, i++)) != NULL) { //. FIXME: DUMP /* * if(opt.flags & FLAG_DUMP) { @@ -344,7 +339,7 @@ void dmi_bios_characteristics_x1(xmlNode *node, u8 code) dmixml_AddAttribute(node, "flags", "0x%04x", code); for(i = 0; i <= 7; i++) { - if( code.l & (1 << i) ) { + if( code & (1 << i) ) { dmixml_AddTextChild(node, "characteristic", characteristics[i]); } } @@ -364,7 +359,7 @@ void dmi_bios_characteristics_x2(xmlNode *node, u8 code) dmixml_AddAttribute(node, "flags", "0x%04x", code); for(i = 0; i <= 2; i++) { - if( code.l & (1 << i) ) { + if( code & (1 << i) ) { dmixml_AddTextChild(node, "characteristic", characteristics[i]); } } |