Skip to content

Commit

Permalink
Increase buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
petabyt committed Sep 10, 2024
1 parent 9e49a13 commit 247584c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ void ptp_panic(char *fmt, ...) {
vprintf(fmt, args);
va_end(args);
fflush(stdout);
putchar('\n');
abort();
}
8 changes: 4 additions & 4 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int test_eos_t6() {

rc = ptp_get_device_info(&r, &di);
if (rc) return rc;
char buffer[2048];
char buffer[4096];
ptp_device_info_json(&di, buffer, sizeof(buffer));
printf("%s\n", buffer);

Expand Down Expand Up @@ -155,7 +155,7 @@ int test_fs() {
struct PtpDeviceInfo di;
rc = ptp_get_device_info(&r, &di);
if (rc) return rc;
char buffer[2048];
char buffer[4096];
ptp_device_info_json(&di, buffer, sizeof(buffer));
printf("%s\n", buffer);

Expand Down Expand Up @@ -208,11 +208,11 @@ int test_fs() {
static void *thread(void *arg) {
struct PtpRuntime *r = (struct PtpRuntime *)arg;

if (rand() & 1 == 0) {
if ((rand() & 1) == 0) {
struct PtpDeviceInfo di;
int rc = ptp_get_device_info(r, &di);
if (rc) goto err;
char buffer[2048];
char buffer[4096];
ptp_device_info_json(&di, buffer, sizeof(buffer));
printf("%s\n", buffer);
} else {
Expand Down

0 comments on commit 247584c

Please sign in to comment.