Skip to contentSkip to conversation

kernel/audit.c char *foo="bar" -> char foo[]="bar"

PATCH In review Masoud Sharbiani 2 participants 2 messages Oct 4, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/audit.c char *foo="bar" -> char foo[]="bar"

Hello,
The patch below, converts the only instance of char *foo="constant" to char *foo[]="constant" cheers,
Masoud

kernel/audit.c +1 -1
@@ -787,7 +787,7 @@ void audit_log_hex(struct audit_buffer *
 	int i, avail, new_len;
 	unsigned char *ptr;
 	struct sk_buff *skb;
-	static const unsigned char *hex = "0123456789ABCDEF";
+	static const unsigned char hex[] = "0123456789ABCDEF";
 
 	BUG_ON(!ab->skb);
 	skb = ab->skb;

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 2 lines · Masoud Sharbiani

The patch below, converts the only instance of char *foo="constant" to char *foo[]="constant"

All gccs here agreed that the size of kernel/audit.o will become smaller. Applied.

kernel/audit.c void audit_log_hex(struct audit_buffer * · line 788

Quoted 6 lines
kernel/audit.c +1 -1
@@ -787,7 +787,7 @@ void audit_log_hex(struct audit_buffer *
 
-	static const unsigned char *hex = "0123456789ABCDEF";
+	static const unsigned char hex[] = "0123456789ABCDEF";

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors