mojoshader.c
changeset 554 42dd28107cd8
parent 553 288ed486e5c3
child 558 314c86ff14dd
equal deleted inserted replaced
553:288ed486e5c3 554:42dd28107cd8
   260 } // Malloc
   260 } // Malloc
   261 
   261 
   262 static inline char *StrDup(Context *ctx, const char *str)
   262 static inline char *StrDup(Context *ctx, const char *str)
   263 {
   263 {
   264     char *retval = (char *) Malloc(ctx, strlen(str) + 1);
   264     char *retval = (char *) Malloc(ctx, strlen(str) + 1);
   265     if (retval == NULL)
   265     if (retval != NULL)
   266         out_of_memory(ctx);
       
   267     else
       
   268         strcpy(retval, str);
   266         strcpy(retval, str);
   269     return retval;
   267     return retval;
   270 } // StrDup
   268 } // StrDup
   271 
   269 
   272 static inline void Free(Context *ctx, void *ptr)
   270 static inline void Free(Context *ctx, void *ptr)