From 6f7a8bbe18e60f6691e7a7c566e28b2a5eda7c94 Mon Sep 17 00:00:00 2001 From: nima Date: Fri, 31 Oct 2008 11:15:19 +0000 Subject: Cleanup. git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@97 abc39116-655e-4be6-ad55-d661dc543056 --- dmidecodemodule.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'dmidecodemodule.c') diff --git a/dmidecodemodule.c b/dmidecodemodule.c index 75d4101..0eeabbb 100644 --- a/dmidecodemodule.c +++ b/dmidecodemodule.c @@ -65,7 +65,7 @@ u8 *parse_opt_type(u8 *p, const char *arg) { static PyObject* dmidecode_get(PyObject *self, const char* section) { - if(self == NULL) return NULL; + //if(self == NULL) return NULL; //mtrace(); @@ -85,12 +85,6 @@ static PyObject* dmidecode_get(PyObject *self, const char* section) { int efi; u8 *buf; - if(sizeof(u8)!=1 || sizeof(u16)!=2 || sizeof(u32)!=4 || '\0'!=0) { - fprintf(stderr, "%s: compiler incompatibility\n", "dmidecodemodule"); - //exit(255); - return NULL; - } - /* Set default option values */ opt.devmem = DEFAULT_MEM_DEV; opt.flags=0; @@ -194,13 +188,13 @@ static PyObject* dmidecode_dump(PyObject *self, PyObject *args) { return Py_Fals static PyObject* dmidecode_load(PyObject *self, PyObject *args) { return Py_False; } static PyObject* dmidecode_get_dev(PyObject *self, PyObject *null) { - if(self == NULL) return NULL; + //if(self == NULL) return NULL; if(opt.dumpfile != NULL) return opt.dumpfile; else return PyString_FromString(opt.devmem); } static PyObject* dmidecode_set_dev(PyObject *self, PyObject *arg) { - if(self == NULL) return NULL; + //if(self == NULL) return NULL; if(PyString_Check(arg)) { if(opt.dumpfile) { Py_DECREF(opt.dumpfile); } opt.dumpfile = arg; -- cgit