Merge pull request #2272 from Sauraus/master

gcc on OSX required explicit return value for empty (char *) in detec…
This commit is contained in:
Alexey 2019-01-22 21:45:38 +03:00 committed by GitHub
commit b47db904ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -713,7 +713,7 @@ char *detection_to_json(detection *dets, int nboxes, int classes, char **names,
int buf_len = strlen(buf);
int total_len = send_buf_len + buf_len + 100;
send_buf = (char *)realloc(send_buf, total_len * sizeof(char));
if (!send_buf) return;// exit(-1);
if (!send_buf) return 0;// exit(-1);
strcat(send_buf, buf);
free(buf);
}