summaryrefslogtreecommitdiff
path: root/Cryptlib/SysCall
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2014-10-06 17:17:33 -0700
committerSteve Langasek <steve.langasek@canonical.com>2014-10-06 17:17:33 -0700
commit59945b252e76a601fc6bbf43fb49f8a8f0d0c9a9 (patch)
tree70e8a684bf6b3480abf1504e7befb1f8f955d962 /Cryptlib/SysCall
parent5fc0e7f624b64f40d5d4694e35f8c967a7317902 (diff)
parent72bb39c0237f8bcc3afa8b623e8b097eec6d69cd (diff)
downloadefi-boot-shim-59945b252e76a601fc6bbf43fb49f8a8f0d0c9a9.tar.gz
efi-boot-shim-59945b252e76a601fc6bbf43fb49f8a8f0d0c9a9.zip
Merge upstream version 0.7
Diffstat (limited to 'Cryptlib/SysCall')
-rw-r--r--Cryptlib/SysCall/BaseMemAllocation.c6
-rw-r--r--Cryptlib/SysCall/CrtWrapper.c10
-rw-r--r--Cryptlib/SysCall/TimerWrapper.c6
3 files changed, 6 insertions, 16 deletions
diff --git a/Cryptlib/SysCall/BaseMemAllocation.c b/Cryptlib/SysCall/BaseMemAllocation.c
index 1abe78e3..75da1dd2 100644
--- a/Cryptlib/SysCall/BaseMemAllocation.c
+++ b/Cryptlib/SysCall/BaseMemAllocation.c
@@ -2,7 +2,7 @@
Base Memory Allocation Routines Wrapper for Crypto library over OpenSSL
during PEI & DXE phases.
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/* Allocates memory blocks */
void *malloc (size_t size)
{
- return AllocatePool ((UINTN)size);
+ return AllocatePool ((UINTN) size);
}
/* Reallocate memory blocks */
@@ -32,7 +32,7 @@ void *realloc (void *ptr, size_t size)
// BUG: hardcode OldSize == size! We have no any knowledge about
// memory size of original pointer ptr.
//
- return ReallocatePool (ptr, (UINTN)size, (UINTN)size);
+ return ReallocatePool (ptr, (UINTN) size, (UINTN) size);
}
/* De-allocates or frees a memory block */
diff --git a/Cryptlib/SysCall/CrtWrapper.c b/Cryptlib/SysCall/CrtWrapper.c
index fb446b67..5a8322d7 100644
--- a/Cryptlib/SysCall/CrtWrapper.c
+++ b/Cryptlib/SysCall/CrtWrapper.c
@@ -293,16 +293,6 @@ size_t fwrite (const void *buffer, size_t size, size_t count, FILE *stream)
// -- Dummy OpenSSL Support Routines --
//
-int BIO_printf (void *bio, const char *format, ...)
-{
- return 0;
-}
-
-int BIO_snprintf(char *buf, size_t n, const char *format, ...)
-{
- return 0;
-}
-
void *UI_OpenSSL(void)
{
return NULL;
diff --git a/Cryptlib/SysCall/TimerWrapper.c b/Cryptlib/SysCall/TimerWrapper.c
index bb7bcba7..cee72ba5 100644
--- a/Cryptlib/SysCall/TimerWrapper.c
+++ b/Cryptlib/SysCall/TimerWrapper.c
@@ -146,14 +146,14 @@ struct tm * gmtime (const time_t *timer)
GmTime->tm_yday = (int) DayNo;
for (MonthNo = 12; MonthNo > 1; MonthNo--) {
- if (DayNo > CumulativeDays[IsLeap(Year)][MonthNo]) {
+ if (DayNo >= CumulativeDays[IsLeap(Year)][MonthNo]) {
DayNo = (UINT16) (DayNo - (UINT16) (CumulativeDays[IsLeap(Year)][MonthNo]));
break;
}
}
- GmTime->tm_mon = (int) MonthNo;
- GmTime->tm_mday = (int) DayNo;
+ GmTime->tm_mon = (int) MonthNo - 1;
+ GmTime->tm_mday = (int) DayNo + 1;
GmTime->tm_isdst = 0;
GmTime->tm_gmtoff = 0;