From cde566277977aa101221c7833dfb2d5aa3718a6a Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Thu, 5 Sep 2024 17:01:26 +0200 Subject: [PATCH] scripts/spicy: Reformat with spicy-format --- scripts/spicy/zeek.spicy | 1 - scripts/spicy/zeek_file.spicy | 14 +++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/spicy/zeek.spicy b/scripts/spicy/zeek.spicy index cc24f96117..ceaf5ca3b1 100644 --- a/scripts/spicy/zeek.spicy +++ b/scripts/spicy/zeek.spicy @@ -507,4 +507,3 @@ public function vector_size(id: string): uint64 &cxxname="zeek::spicy::rt::vecto ## ## v: opaque handle to the Zeek vector, as returned by other functions public function vector_size(v: ZeekVector): uint64 &cxxname="zeek::spicy::rt::vector_size"; - diff --git a/scripts/spicy/zeek_file.spicy b/scripts/spicy/zeek_file.spicy index 71082f9be9..c355a9a4cb 100644 --- a/scripts/spicy/zeek_file.spicy +++ b/scripts/spicy/zeek_file.spicy @@ -16,15 +16,19 @@ import zeek; ## size: Total number of bytes the file contains, if known; will be passed on to Zeek public type File = unit(mime_type: optional = Null, size: optional = Null) { on %init { - self.fid = zeek::file_begin(mime_type); + self.fid = zeek::file_begin(mime_type); - if ( size ) - zeek::file_set_size(*size, self.fid); + if (size) + zeek::file_set_size(*size, self.fid); } - : bytes &chunked &eod { zeek::file_data_in($$, self.fid); } + : bytes &chunked &eod { + zeek::file_data_in($$, self.fid); + } - on %finally { zeek::file_end(self.fid); } + on %finally { + zeek::file_end(self.fid); + } ## Zeek-side file ID var fid: string;