Browse Source

Do not explicitly cast void pointers from malloc

Fredrik Haikarainen 9 years ago
parent
commit
24f6a72cdd
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      src/helpers.c
  2. 1
    1
      src/light.c

+ 1
- 1
src/helpers.c View File

135
   rewind(fileHandle);
135
   rewind(fileHandle);
136
 
136
 
137
   /* Allocate the string and null-terminate it */
137
   /* Allocate the string and null-terminate it */
138
-  buffer = (char*) malloc(sizeof(char)*(fileSize+1));
138
+  buffer = malloc(sizeof(char)*(fileSize+1));
139
   memset(buffer, '\0', fileSize);
139
   memset(buffer, '\0', fileSize);
140
 
140
 
141
   if(buffer == NULL)
141
   if(buffer == NULL)

+ 1
- 1
src/light.c View File

501
 
501
 
502
 LIGHT_BOOL light_genPath(char const *controller, LIGHT_TARGET type, char **buffer)
502
 LIGHT_BOOL light_genPath(char const *controller, LIGHT_TARGET type, char **buffer)
503
 {
503
 {
504
-  char* returner = (char*)malloc(256);
504
+  char* returner = malloc(256);
505
   int spfVal = -1;
505
   int spfVal = -1;
506
 
506
 
507
   if(returner == NULL)
507
   if(returner == NULL)