Skip to content

Commit 247584c

Browse files
committed
Increase buffer size
1 parent 9e49a13 commit 247584c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ void ptp_panic(char *fmt, ...) {
2222
vprintf(fmt, args);
2323
va_end(args);
2424
fflush(stdout);
25+
putchar('\n');
2526
abort();
2627
}

test/test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ int test_eos_t6() {
7474

7575
rc = ptp_get_device_info(&r, &di);
7676
if (rc) return rc;
77-
char buffer[2048];
77+
char buffer[4096];
7878
ptp_device_info_json(&di, buffer, sizeof(buffer));
7979
printf("%s\n", buffer);
8080

@@ -155,7 +155,7 @@ int test_fs() {
155155
struct PtpDeviceInfo di;
156156
rc = ptp_get_device_info(&r, &di);
157157
if (rc) return rc;
158-
char buffer[2048];
158+
char buffer[4096];
159159
ptp_device_info_json(&di, buffer, sizeof(buffer));
160160
printf("%s\n", buffer);
161161

@@ -208,11 +208,11 @@ int test_fs() {
208208
static void *thread(void *arg) {
209209
struct PtpRuntime *r = (struct PtpRuntime *)arg;
210210

211-
if (rand() & 1 == 0) {
211+
if ((rand() & 1) == 0) {
212212
struct PtpDeviceInfo di;
213213
int rc = ptp_get_device_info(r, &di);
214214
if (rc) goto err;
215-
char buffer[2048];
215+
char buffer[4096];
216216
ptp_device_info_json(&di, buffer, sizeof(buffer));
217217
printf("%s\n", buffer);
218218
} else {

0 commit comments

Comments
 (0)