Skip to content

Commit c243cac

Browse files
att
1 parent d57af56 commit c243cac

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

doTheWorld.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,7 +2072,6 @@ typedef struct DtwResourceModule{
20722072

20732073

20742074
DtwResource * (*sub_resource_ensuring_not_exist)(DtwResource *self,const char *format, ...);
2075-
DtwSchema * (*new_schema)(DtwResource *self, const char *format, ...);
20762075
DtwResource * (*sub_resource_next)(DtwResource *self, const char *end_path);
20772076
DtwResource * (*sub_resource_now)(DtwResource *self, const char *end_path);
20782077

@@ -5707,11 +5706,12 @@ char * calc_sha_256_from_file_returning_string(const char *filename)
57075706

57085707

57095708
char *dtw_base64_encode(unsigned char *data, long input_length){
5709+
if (data == NULL) return NULL;
5710+
57105711
size_t output_length = 4 * ((input_length + 2) / 3);
57115712

57125713
char *encoded_data = (char *)malloc(output_length + 1);
57135714

5714-
if (encoded_data == NULL) return NULL;
57155715

57165716
long i, j;
57175717
for (i = 0, j = 0; i < input_length; ) {

src/base64/base64.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22

33
char *dtw_base64_encode(unsigned char *data, long input_length){
4+
if (data == NULL) return NULL;
5+
46
size_t output_length = 4 * ((input_length + 2) / 3);
57

68
char *encoded_data = (char *)malloc(output_length + 1);
79

8-
if (encoded_data == NULL) return NULL;
910

1011
long i, j;
1112
for (i = 0, j = 0; i < input_length; ) {

src/namespace/resource_module/resource_module/resource_module.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ typedef struct DtwResourceModule{
4242

4343

4444
DtwResource * (*sub_resource_ensuring_not_exist)(DtwResource *self,const char *format, ...);
45-
DtwSchema * (*new_schema)(DtwResource *self, const char *format, ...);
4645
DtwResource * (*sub_resource_next)(DtwResource *self, const char *end_path);
4746
DtwResource * (*sub_resource_now)(DtwResource *self, const char *end_path);
4847

tests/doTheWorld_test.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,7 +2072,6 @@ typedef struct DtwResourceModule{
20722072

20732073

20742074
DtwResource * (*sub_resource_ensuring_not_exist)(DtwResource *self,const char *format, ...);
2075-
DtwSchema * (*new_schema)(DtwResource *self, const char *format, ...);
20762075
DtwResource * (*sub_resource_next)(DtwResource *self, const char *end_path);
20772076
DtwResource * (*sub_resource_now)(DtwResource *self, const char *end_path);
20782077

@@ -5707,11 +5706,12 @@ char * calc_sha_256_from_file_returning_string(const char *filename)
57075706

57085707

57095708
char *dtw_base64_encode(unsigned char *data, long input_length){
5709+
if (data == NULL) return NULL;
5710+
57105711
size_t output_length = 4 * ((input_length + 2) / 3);
57115712

57125713
char *encoded_data = (char *)malloc(output_length + 1);
57135714

5714-
if (encoded_data == NULL) return NULL;
57155715

57165716
long i, j;
57175717
for (i = 0, j = 0; i < input_length; ) {
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
2
2-
0
31
3
4-
4
5-
6
2+
1
3+
8
64
9
7-
5
5+
0
6+
2
87
7
9-
8
10-
1
8+
6
9+
5
10+
4

0 commit comments

Comments
 (0)