We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ac4bfc1 + cb9eb60 commit 47c10f0Copy full SHA for 47c10f0
sdjournal/journal.go
@@ -310,7 +310,7 @@ package sdjournal
310
// }
311
//
312
// char *
313
-// my_sd_id128_to_string(void *f, sd_id128_t boot_id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX])
+// my_sd_id128_to_string(void *f, sd_id128_t boot_id, char s[SD_ID128_STRING_MAX])
314
// {
315
// char *(*sd_id128_to_string)(sd_id128_t, char *);
316
@@ -1155,7 +1155,8 @@ func (j *Journal) GetBootID() (string, error) {
1155
return "", err
1156
}
1157
1158
- c := (*C.char)(C.malloc(33))
+ id128StringMax := C.ulong(C.SD_ID128_STRING_MAX)
1159
+ c := (*C.char)(C.malloc(id128StringMax))
1160
defer C.free(unsafe.Pointer(c))
1161
C.my_sd_id128_to_string(sd_id128_to_string, boot_id, c)
1162
0 commit comments