diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-31 08:30:00 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-31 08:30:00 +0000 |
commit | c81c458bcffbb973d90c5902bb73d2bbd7ff843c (patch) | |
tree | 605b5e30b33b02a6d49acab526814c8720ca03b7 /dmihelper.c | |
parent | fd945b4d3ecdb0e678d595896328ba200a552345 (diff) | |
download | python-dmidecode-c81c458bcffbb973d90c5902bb73d2bbd7ff843c.tar.gz python-dmidecode-c81c458bcffbb973d90c5902bb73d2bbd7ff843c.tar.xz python-dmidecode-c81c458bcffbb973d90c5902bb73d2bbd7ff843c.zip |
Cleanup.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@90 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'dmihelper.c')
-rw-r--r-- | dmihelper.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/dmihelper.c b/dmihelper.c index 17f85f9..6d52e04 100644 --- a/dmihelper.c +++ b/dmihelper.c @@ -3,6 +3,7 @@ #include "dmihelper.h" +/* dmi_minor* dmiAppendObject(long code, char const *key, const char *format, ...) { static dmi_minor* last = NULL; @@ -18,19 +19,19 @@ dmi_minor* dmiAppendObject(long code, char const *key, const char *format, ...) o->major = (dmi_codes_major *)&dmiCodesMajor[map_maj[code>>8]]; o->key = (char *)key; - if(format != NULL) - if(vsnprintf(o->value, MAXVAL-1, format, arg) > MAXVAL) { - free(o); - o = NULL; - //. TODO: Make this a python exception. - printf("dmidecode: Internal (python module) error; Value too long.\n"); - } + if((format != NULL)&&(vsnprintf(o->value, MAXVAL-1, format, arg) > MAXVAL)) { + free(o); + o = NULL; + //. TODO: Make this a python exception. + printf("dmidecode: Internal (python module) error; Value too long.\n"); + } last = o; - va_end(arg); /* cleanup */ + va_end(arg); // cleanup return o; } +*/ int dmiSetItem(PyObject* dict, const char *key, const char *format, ...) { va_list arg; |