Skip to content

Commit

Permalink
Merge pull request #358 from lucab/ups/sdjournal-conditional-static
Browse files Browse the repository at this point in the history
sdjournal: drop conditional static specifier
  • Loading branch information
Luca Bruno authored Mar 17, 2021
2 parents ac4bfc1 + cb9eb60 commit 47c10f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdjournal/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ package sdjournal
// }
//
// char *
// 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])
// {
// char *(*sd_id128_to_string)(sd_id128_t, char *);
//
Expand Down Expand Up @@ -1155,7 +1155,8 @@ func (j *Journal) GetBootID() (string, error) {
return "", err
}

c := (*C.char)(C.malloc(33))
id128StringMax := C.ulong(C.SD_ID128_STRING_MAX)
c := (*C.char)(C.malloc(id128StringMax))
defer C.free(unsafe.Pointer(c))
C.my_sd_id128_to_string(sd_id128_to_string, boot_id, c)

Expand Down

0 comments on commit 47c10f0

Please sign in to comment.