diff options
| author | Leandro Pereira <leandro@hardinfo.org> | 2010-08-15 18:36:25 -0300 | 
|---|---|---|
| committer | Leandro Pereira <leandro@hardinfo.org> | 2010-08-15 18:36:25 -0300 | 
| commit | 9fda18663f31e67d8c1c50e1c5a1888abceda2a6 (patch) | |
| tree | a680bd9c701eaec1016d6beb28bf2c79cfc538e0 /modules/devices/spd-decode.c | |
| parent | 9fe6a457e1d9d01f6645d91805691afd429d0a2c (diff) | |
Fix potential problems found by clang static analyzer.
Diffstat (limited to 'modules/devices/spd-decode.c')
| -rw-r--r-- | modules/devices/spd-decode.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/devices/spd-decode.c b/modules/devices/spd-decode.c index 2a72725b..bb22c1b7 100644 --- a/modules/devices/spd-decode.c +++ b/modules/devices/spd-decode.c @@ -633,7 +633,7 @@ static int parity(int value)  static void decode_sdr_module_size(unsigned char *bytes, int *size)  { -    int i, k; +    int i, k = 0;      i = (bytes[3] & 0x0f) + (bytes[4] & 0x0f) - 17;      if (bytes[5] <= 8 && bytes[17] <= 8) { @@ -1154,7 +1154,7 @@ static void decode_module_manufacturer(unsigned char *bytes,      do {  	ai++; -    } while ((--len && (first = *bytes++ == 0x7f))); +    } while ((--len && (*bytes++ == 0x7f)));      first = *--bytes;      if (ai == 0) { @@ -1288,6 +1288,7 @@ static gchar *decode_dimms(GSList *dimm_list, gboolean use_sysfs)              break;          default:              DEBUG("Unsupported EEPROM type: %s\n", ram_types[ram_type]); +            continue;          }          read_spd(spd_path, 64, 64, use_sysfs, bytes);  | 
