lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Jan 2008 21:39:52 +0100 (CET)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
cc:	akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 07/26] Add INIT_ARRAY() to kernel.h


On Jan 24 2008 15:27, Mathieu Desnoyers wrote:
>such as:
>text_poke(addr, INIT_ARRAY(unsigned char, 0xf0, len), len);
 text_poke(addr, (unsigned char[]){[0 ... len-1] = val});

Well ugliness is debatable, but at least:

>+#define INIT_ARRAY(type, val, len) ((type [len]) { [0 ... (len)-1] = (val) })
  #define INIT_ARRAY(type, val, len) ((type[]){[0 ... (len)-1] = (val)})

You can use type[].
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ