diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dmidecodemodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dmidecodemodule.c b/src/dmidecodemodule.c index fdef4ad..0e2ff10 100644 --- a/src/dmidecodemodule.c +++ b/src/dmidecodemodule.c @@ -462,7 +462,8 @@ static PyObject *dmidecode_get_type(PyObject * self, PyObject * args) if( (typeid >= 0) && (typeid < 256) ) { pydata = dmidecode_get_typeid(global_options, typeid); } else { - snprintf(msg, 8192, "Types are bound between 0 and 255 (inclusive)%c", 0); + snprintf(msg, 8192, "Types are bound between 0 and 255 (inclusive)." + "Type value used was '%i'%c", typeid, 0); pydata = NULL; } } else { @@ -505,7 +506,8 @@ static PyObject *dmidecode_set_dev(PyObject * self, PyObject * arg) struct stat buf; char *f = PyString_AsString(arg); - if( (f != NULL) && (strcmp(global_options->dumpfile, f) == 0) ) { + if( (f != NULL) && (global_options->dumpfile != NULL ) + && (strcmp(global_options->dumpfile, f) == 0) ) { Py_RETURN_TRUE; } |