bitpunkfm on Nostr: Ok I see thanks. So, my security code review eyes would want to make a comment on ...
Ok I see thanks. So, my security code review eyes would want to make a comment on this style and say that declaration should go with assignment.
Because what can happen is that the default assignment is sometimes used mistakenly and results in undefined behavior.
Obviously not an issue if you follow up with the assignments as you did, but just stating an observation.
Published at
2024-10-27 17:58:11Event JSON
{
"id": "78c2c6932609a749158c21234115669b8a111d9c1bb0863171040002522fe8a5",
"pubkey": "4d4ab737e2fbb5af0fd590b4b7e8c6fe76d3a02a9791ef7fdacf601f9e50fad8",
"created_at": 1730051891,
"kind": 1,
"tags": [
[
"e",
"d1d079cbbb005ee74d43e81af42370cd12e17a7dac80ab01785212485ab3e070",
"",
"root"
],
[
"e",
"9a2f7ee23b769438cec0b204c3ae4af8295ff14ed3677ebe2a28b31ccb8175e7"
],
[
"e",
"5c0236bd050952eb943fcf180848171196a5f0a39e443163b6b3fc9f759a2d8a",
"",
"reply"
],
[
"p",
"4d4ab737e2fbb5af0fd590b4b7e8c6fe76d3a02a9791ef7fdacf601f9e50fad8"
],
[
"p",
"036533caa872376946d4e4fdea4c1a0441eda38ca2d9d9417bb36006cbaabf58"
]
],
"content": "Ok I see thanks. So, my security code review eyes would want to make a comment on this style and say that declaration should go with assignment.\n\nBecause what can happen is that the default assignment is sometimes used mistakenly and results in undefined behavior.\n\nObviously not an issue if you follow up with the assignments as you did, but just stating an observation.",
"sig": "df151640856616c9f4e42b0755cfa3ab088503a7ecd1ace567ef458222c508cbcca336e106f26c327c499cc64a29db7332a19510b4945216f8c4ba1d3a96398b"
}