Skip to content

Commit aacef53

Browse files
Add const
1 parent 67f8e49 commit aacef53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bwping.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static void prepare_ping4( char * const packet, const uint16_t ident, const bool
287287
/* Optimization: it is assumed that both regular packets and timestamped packets have a static lifetime, and their ICMP headers are prepared once and for all - except
288288
* for the checksum of timestamped packets */
289289
if ( icmp_type_v != ICMP_ECHO ) {
290-
struct icmp icmp_v = { .icmp_type = ICMP_ECHO, .icmp_code = 0, .icmp_cksum = 0, .icmp_id = htons( ident ), .icmp_seq = 0 };
290+
const struct icmp icmp_v = { .icmp_type = ICMP_ECHO, .icmp_code = 0, .icmp_cksum = 0, .icmp_id = htons( ident ), .icmp_seq = 0 };
291291

292292
memcpy( packet, &icmp_v, sizeof( icmp_v ) );
293293

0 commit comments

Comments
 (0)