1
0

two liner

This commit is contained in:
dtb 2023-08-29 21:43:28 -04:00
parent f2268e471a
commit d9aae297ca

View File

@ -35,10 +35,11 @@ char *
FatStr_convert(struct FatStr *p){ FatStr_convert(struct FatStr *p){
char *r; char *r;
if((r = malloc(p->s * (sizeof *(p->v)))) == NULL) /* might be buggy */ /* allocation might be wrong */
return NULL; return ((r = malloc(p->s * (sizeof *(p->v)))) == NULL)
strncpy(r, p->v, p->s); ? NULL
return r; : strncpy(r, p->v, p->s)
;
} }
struct FatStr * struct FatStr *