update hint and code style

This commit is contained in:
vcaesar 2018-09-14 17:42:03 -04:00
parent 7d4573cdd4
commit f8efcea0b0
3 changed files with 5 additions and 8 deletions

View File

@ -29,8 +29,7 @@ const static int8_t b64_decode_table[256] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* F0-FF */
};
uint8_t *base64decode(const uint8_t *src, const size_t buflen, size_t *retlen)
{
uint8_t *base64decode(const uint8_t *src, const size_t buflen, size_t *retlen){
int8_t digit, lastdigit;
size_t i, j;
uint8_t *decoded;
@ -65,8 +64,7 @@ uint8_t *base64decode(const uint8_t *src, const size_t buflen, size_t *retlen)
return decoded; /* Must be free()'d by caller */
}
uint8_t *base64encode(const uint8_t *src, const size_t buflen, size_t *retlen)
{
uint8_t *base64encode(const uint8_t *src, const size_t buflen, size_t *retlen){
size_t i, j;
const size_t maxlen = (((buflen + 3) & ~3)) * 4;
uint8_t *encoded = malloc(maxlen + 1);

View File

@ -6,8 +6,7 @@
#define ZLIB_CHUNK (16 * 1024)
uint8_t *zlib_decompress(const uint8_t *buf, size_t *len)
{
uint8_t *zlib_decompress(const uint8_t *buf, size_t *len){
size_t output_size = ZLIB_CHUNK;
uint8_t *output = malloc(output_size);
int err;

View File

@ -79,7 +79,7 @@ char* set_XDisplay_name(char* name){
setXDisplay(name);
return "success";
#else
return "setXDisplayName is only supported on Linux";
return "SetXDisplayName is only supported on Linux";
#endif
}
@ -91,7 +91,7 @@ char* get_XDisplay_name(){
return sd;
#else
return "getXDisplayName is only supported on Linux";
return "GetXDisplayName is only supported on Linux";
#endif
}