diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-01-10 18:07:56 (EST) |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-01-10 18:07:56 (EST) |
commit | f6da483213c5a9ad026c2740eeff120414492a40 (patch) | |
tree | 72c62f49cc617a15a023134c26679c30133aacab /resources/utilities/ich9deblob/src/ich9gen.c | |
parent | 74adfa0f8c41754d1a74006b6ca5f923fd2af503 (diff) | |
download | libreboot-f6da483213c5a9ad026c2740eeff120414492a40.zip libreboot-f6da483213c5a9ad026c2740eeff120414492a40.tar.gz libreboot-f6da483213c5a9ad026c2740eeff120414492a40.tar.bz2 |
ich9deblob/ich9gen: use portable data types
For those integers that need to be a certain byte size.
Diffstat (limited to 'resources/utilities/ich9deblob/src/ich9gen.c')
-rw-r--r-- | resources/utilities/ich9deblob/src/ich9gen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/resources/utilities/ich9deblob/src/ich9gen.c b/resources/utilities/ich9deblob/src/ich9gen.c index ad43a9d..998dcf2 100644 --- a/resources/utilities/ich9deblob/src/ich9gen.c +++ b/resources/utilities/ich9deblob/src/ich9gen.c @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) { int i, j; - unsigned char customMacAddress[6]; /* Only set/used if the user wants to */ + uint8_t customMacAddress[6]; /* Only set/used if the user wants to */ struct GBEREGIONRECORD_8K gbeStruct8k = generatedGbeStruct8k(); struct DESCRIPTORREGIONRECORD descriptorStruct4M = generatedDescriptorStructRom4M(); @@ -74,11 +74,11 @@ int main(int argc, char *argv[]) /* Go through each nibble of the byte */ for(j=0; j<2; j++) { if(argv[2][(i*3)+j]>='a' && argv[2][(i*3)+j]<='f') - customMacAddress[i] |= (argv[2][(i*3)+j] - 87) << ((j^1) << 2); + customMacAddress[i] |= (uint8_t)((argv[2][(i*3)+j] - 87) << ((j^1) << 2)); else if(argv[2][(i*3)+j]>='A' && argv[2][(i*3)+j]<='F') - customMacAddress[i] |= (argv[2][(i*3)+j] - 55) << ((j^1) << 2); + customMacAddress[i] |= (uint8_t)((argv[2][(i*3)+j] - 55) << ((j^1) << 2)); else if(argv[2][(i*3)+j]>='0' && argv[2][(i*3)+j]<='9') - customMacAddress[i] |= (argv[2][(i*3)+j] - 48) << ((j^1) << 2); + customMacAddress[i] |= (uint8_t)((argv[2][(i*3)+j] - 48) << ((j^1) << 2)); else { printf("ich9gen: invalid mac address format (non-hex characters)\n"); return 1; |