Skip to content

Commit 8ef2445

Browse files
committed
Fix some verification conditions
1 parent d0ac5a9 commit 8ef2445

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/coap_spark-channel.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ is
303303
Input.Buffer'Length <= Buffer'Length
304304
then
305305
Length := RFLX.RFLX_Builtin_Types.Length (Input.Last);
306-
Buffer (1 .. RFLX.RFLX_Builtin_Types.Index (Length)) :=
306+
Buffer (1 .. RFLX.RFLX_Builtin_Types.Index'Base (Length)) :=
307307
To_RFLX_Bytes (Input.Buffer);
308308
else
309309
Socket.Result :=

src/coap_spark-messages-encoding.adb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ package body CoAP_SPARK.Messages.Encoding is
478478
is
479479
begin
480480

481+
Status := OK;
482+
481483
if Data'Length = 0 then
482484

483485
CoAP_SPARK.Log.Put_Line ("Options and payload are empty");

src/coap_spark-messages.ads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ is
3434
type Content is record
3535
Options : CoAP_SPARK.Options.Lists.Vector;
3636
Format : Interfaces.Unsigned_32 := 0;
37-
Payload : Payload_Ptr;
37+
Payload : Payload_Ptr := null;
3838
end record;
3939

4040
-- Log the content of a message according to the log levels for options and

0 commit comments

Comments
 (0)