mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2025-04-28 20:06:02 +00:00
C99 Compliance (#29)
This pull request brings Cytoplasm up from C89 to C99, which makes it much more portable across platforms. In particular, this pull request solves a number of issues with 32-bit platforms. Closes #28. Closes #12. Closes #20. Reviewed-on: https://git.telodendria.io/Telodendria/Cytoplasm/pulls/29
This commit is contained in:
parent
d0969d0dd7
commit
662696ce12
40 changed files with 384 additions and 1667 deletions
|
@ -212,7 +212,7 @@ Base64Unpad(char *base64, size_t length)
|
|||
base64[length] = '\0';
|
||||
}
|
||||
|
||||
extern int
|
||||
bool
|
||||
Base64Pad(char **base64Ptr, size_t length)
|
||||
{
|
||||
char *tmp;
|
||||
|
@ -221,7 +221,7 @@ Base64Pad(char **base64Ptr, size_t length)
|
|||
|
||||
if (length % 4 == 0)
|
||||
{
|
||||
return length; /* Success: no padding needed */
|
||||
return true; /* Success: no padding needed */
|
||||
}
|
||||
|
||||
newSize = length + (4 - (length % 4));
|
||||
|
@ -229,7 +229,7 @@ Base64Pad(char **base64Ptr, size_t length)
|
|||
tmp = Realloc(*base64Ptr, newSize + 100);;
|
||||
if (!tmp)
|
||||
{
|
||||
return 0; /* Memory error */
|
||||
return false; /* Memory error */
|
||||
}
|
||||
*base64Ptr = tmp;
|
||||
|
||||
|
@ -240,5 +240,5 @@ Base64Pad(char **base64Ptr, size_t length)
|
|||
|
||||
(*base64Ptr)[newSize] = '\0';
|
||||
|
||||
return newSize;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue