<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Confusing definition</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/877/confusing-definition</link><description>C:\Nordic Semiconductor\nrf51_sdk_v4_4_1_31827\nrf51822\Include\ble\softdevice\ble_gatts.h 
 
typedef struct {
 uint16_t handle; /**&amp;lt; Attribute Handle. */
 uint8_t op; /**&amp;lt; Type of write operation, see @ref BLE_GATTS_OPS. */
 ble_gatts_attr_context_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Nov 2013 13:44:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/877/confusing-definition" /><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4307?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 13:44:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3931a0b3-7b26-4b28-a2ff-c6f150f01f04</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;An application does care what is it reading/writing.
In your code memory is statically allocated by the library which obviously has no clue about any data object and thus should be uint8_t data[] or uint8_t data[MAX_SIZE]. My point is that application code should not need to ever declare a variable but create a typedef to parse in/out data&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4300?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 13:40:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e091f8b0-0ede-4c66-aa03-47f6f6b3d447</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I&amp;#39;m wasn&amp;#39;t offended, but I find it strange to downvote an answer, not because it&amp;#39;s wrong, but because you personally disagree with it. Even when re-reading your original question and my answer, I honestly think I&amp;#39;ve answered the exact questions you were raising.&lt;/p&gt;
&lt;p&gt;Since I don&amp;#39;t know a lot about your proficiency with C, I found it appropriate to include some pointers for further information in case my explanation wasn&amp;#39;t clear. This may also be useful for other people that later may find this question.&lt;/p&gt;
&lt;p&gt;I do agree with your general intentions of writing clear code, it&amp;#39;s just that we disagree on whether this particular definition is clear or not. Using a well-established pattern, even though an apparently slightly controversial one, is normally exactly what I&amp;#39;d say is a good solution.&lt;/p&gt;
&lt;p&gt;Warnings should of course always be avoided, and that something works is in itself no excuse for having out-of-spec code, it&amp;#39;s just that this snippet in question is not out-of-spec.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not going to go further into your try to make this a discussion on education and profession, but I can assure you that most people working in our software department are properly educated software engineers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4306?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 13:28:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:985939ff-66c8-4ef3-9713-b247ffecdf7b</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure I understand what you mean about static declarations. My point was that application code should not need to ever declare a variable of this type (although possibly a pointer to one).&lt;/p&gt;
&lt;p&gt;Unfortunately, I don&amp;#39;t think we&amp;#39;ll ever fully agree on what is most readable and not here, but I&amp;#39;ve added a request internally to consider this question again, either adding a more extensive comment or possibly also change the declaration to [], to indicate that the length is in fact unknown at compile time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4299?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 13:26:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75a76f89-01ba-4086-b770-736530607ec0</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;&amp;quot;I&amp;#39;m a little unsure why you found my answer worthy a down-vote, though, as I seriously tried to explain why this was there and what it means.&amp;quot;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;This is mostly result of my frustration and I did instantly try to remove but a) I&amp;#39;m not smart enough to figure out how to do so, b) this website doesn&amp;#39;t allow to.&lt;/li&gt;
&lt;li&gt;I was unhappy with your intent to explain me C and not the subject of the matter. If you will this is sort of religious war between software professionals and electrical engineers who are writing code... Software people are trained always to write code that not only works but it is portable, warning free, readable and clear how it does so when EE guys are usually stopping with &amp;quot;it works now&amp;quot; and maybe adding some comments...&lt;/li&gt;
&lt;li&gt;I&amp;#39;m sorry if in any way offended you.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4298?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 13:14:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80b03a65-0d55-48bf-8b03-e71a127fbf71</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;&amp;quot;in my opinion whether that&amp;#39;s any clearer is mostly a matter of taste, when most of this array may very well be uninitialized memory.&amp;quot;
I&amp;#39;m always applying the rule: clearly define the object and use it&amp;#39;s definition.
In other words in my application expects a message it needs to know how to interpret it. So
typedef enum { MON, TUE, WED, THU, FRI, SAT, SUN } my_app_t is much better than uint8_t week_day;
And when the message structure is
typedef struct {
my_app_t begin;
my_app_t end;
} my_msg_t;
I&amp;#39;d verify that len is == sizeof(my_msg_t) and then will use it as data-&amp;gt;begin and data-&amp;gt;end and not data[0] and data[1] and getting warning about data[1]...
BTW Warnings should be strictly prohibited - compiler doesn&amp;#39;t understand your intent and therefore such code is not portable even if it is correct for particular case.&lt;/p&gt;
&lt;p&gt;Isn&amp;#39;t if clear and very readable?!&lt;/p&gt;
&lt;p&gt;uint8_t&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4305?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 13:01:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a346ced-6b60-4596-85b0-742c8657a40d</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to response as soon as I can to beat the time difference, so excuse me it is little bit aster 6 in the morning here...
Your said:&amp;quot;Beware that you are never expected to initialize a struct of this type, as it&amp;#39;s only an event structure&amp;quot;.
There is option static winch forces a compiler to initialize memory with 0 and yes this is static and not dynamic memory. That is exactly what SD is doing. BTW please mention the exact type: we&amp;#39;re talking about quite few in this discussion.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://c-faq.com/struct/structhack.html" rel="nofollow"&gt;http://c-faq.com/struct/structhack.html&lt;/a&gt;
char data[]  is defined in C99 and not in C89 as you said before.
char data[1] is defined  in both standards. Yet it is very tastefulness to use [1] as commenting it as variable length. In this case adding extra pointer and all hassles which come with it is much better for readability. It worth it from my stand point especially if this code is published for other people reading/using. Don&amp;#39;t see any issues with static allocation by SD array of MAX_MTU size and application casting it to the any type it knows and needs.&lt;/p&gt;
&lt;p&gt;Thank you for coming back to this discussion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4304?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 12:15:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f2bbde5-422b-4295-aa8d-6a7297d6674c</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Beware that you are never expected to initialize a struct of this type, as it&amp;#39;s only an event structure, initialized by the softdevice to notify you as an application of an incoming Write Command / Request.&lt;/p&gt;
&lt;p&gt;If you are to initialize some other struct employing the same concept, you would manually have to make sure to initialize it with appropriate size for the data you want to fit.&lt;/p&gt;
&lt;p&gt;After checking a little more, it&amp;#39;s apparently known as the &amp;quot;struct hack&amp;quot;, and explained in more detail here, including how to initialize such struct:
&lt;a target="_blank" href="http://c-faq.com/struct/structhack.html" rel="nofollow"&gt;http://c-faq.com/struct/structhack.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4311?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 12:11:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72aea33f-97d3-43a4-b533-b8a79660e11b</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;This array will always have a length &amp;gt;= 1. For the write event in particular, it can be up to BLE_L2CAP_MTU_DEF-3 bytes, as given in the Bluetooth Core Specification, Volume 3, Part F, section 3.4.5.1 and 3.4.5.3.&lt;/p&gt;
&lt;p&gt;As I mentioned in another comment below, the actual length will indeed be variable, and depends on how much data the peer device actually wrote.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4297?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 12:09:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65fe1071-d7d2-4ae4-9672-e69f2578ed90</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry for the delay here, but we&amp;#39;ve been busy with internal training lately.&lt;/p&gt;
&lt;p&gt;I guess you&amp;#39;re right that another option instead of using the [1] would have been to use [BLE_L2CAP_MTU_DEF], but in my opinion whether that&amp;#39;s any clearer is mostly a matter of taste, when most of this array may very well be uninitialized memory.&lt;/p&gt;
&lt;p&gt;This array will actually be variable length, since it will contain whatever was in the write event coming over the air. From the S110 side, you have no control over this, it&amp;#39;s only limited by the peer device and the Bluetooth Spec.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m a little unsure why you found my answer worthy a down-vote, though, as I seriously tried to explain why this was there and what it means. I&amp;#39;m sorry if I came off rude, but I can very well see why this seems confusing. What I can&amp;#39;t quite understand is how you can insist that I and my explanation is wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4313?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2013 22:08:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01581640-e41c-470e-9c36-490f256c156a</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;This is the answer:  ble_stack_handler_init(). Don&amp;#39;t like it though but this is matter of taste and &amp;gt; de gustibus non est disputandum
.&lt;br /&gt;
Even taking programming stile aside yet the comments must be better and cleaner.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4312?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2013 18:11:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84f49b4b-57ef-4c57-8323-276aca7478b9</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;Matt, are you saying that length can&amp;#39;t exceed one byte? It seems to me wrong...
Yet we have another ambiguity...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4310?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2013 18:11:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36b57343-cd66-47df-af1c-687f1fcd92c0</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;Matt, are you saying that length can&amp;#39;t exceed one byte? It seems to me wrong...
Yet we have another ambiguity...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4309?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2013 16:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92f1bb7a-104f-4e60-b482-34861ec4f030</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;I think the confusion here is about the comment associated with the struct member data. It is clearly an array of length one, but the comment documenting it says it is variable length. If data were more than one element long the it could be undestood that the maximum expected size was always allocated but not always used, but here data is only one element. I suppose this struct could be populated with zero or one elements in data which would make it variable length.&lt;/p&gt;
&lt;p&gt;So the questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it valid for length to be zero, implying data should be ignored?&lt;/li&gt;
&lt;li&gt;is it valid for length to be one, implying data contains a single element?&lt;/li&gt;
&lt;li&gt;If zero length is not valid, is the comment stating that data is variable length erroneous (i.e. the result of copying a template, pasting, editing names, and not updating the comments)?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4308?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2013 02:39:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6256cd5-4dd5-490c-8c4f-a2406fafb033</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;Please notice that we&amp;#39;re arguing NOT about C but about stile and readability.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4296?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2013 02:30:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f835477f-7c3f-48fe-a1dd-40f84c40b061</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;&amp;quot;to make it clear that the array is placed inside the struct, and not just a pointer to somewhere else.&amp;quot;
Understood. To achieve that one has to allocate the maximum possible length and then length will become variable from 1 to max.
If such maximum length is defined as one how come it possible be variable as the comment says?!
Also this approach means that EACH write event has to have its own type and if so how this type is defined inside the common library header?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m afraid that this dialog is going to nowhere and if so it is probably the best to stop it as is unresolved...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4303?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2013 17:53:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14abd86b-4e27-4651-b28e-02ec6117a922</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;Sorry again...How can one implement variable length? Byte by byte with the offset 1? Why then have member len? I have serious trouble understanding your point. Yes one can create ble_gatts_evt_X_write_t, ble_gatts_evt_Y_write_t, ble_gatts_evt_Z_write_t and so on and in this case each event will have its own constant not variable length. Or use ble_gatts_evt_write_t with the length 1 and use offset if more than one byte is required. Or I&amp;#39;m totally misunderstanding what those types are trying to achieve...&lt;/p&gt;
&lt;p&gt;Lets say I have LED which is using event write to turn it on and off(bool) and I have a DAC and need to set it up(uint16_t). How to manage this combination?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4302?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2013 17:35:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dddb04e7-4e49-4604-9b64-36e909f751ea</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;This isn&amp;#39;t really feasible, as the value within this array can be any data, of any format. If you look into the on-air operations, there is no requirement that this data is structured in any way. Also, even if the characteristic value have a certain structure, the data used here can be offset, and hence have no structure after all. A variable sized array is therefore the only reasonable option as far as I can see.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4295?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2013 17:33:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:216ee217-cbd2-420a-814d-d718bee4f619</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry, but I can&amp;#39;t really help that you find it confusing, but this is perfectly valid C, and the use case is fine: to make it clear that the array is placed inside the struct, and not just a pointer to somewhere else.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d again like to recommend having a look at the blog post I linked. Also remember that this struct is inside a ble_evt_t, and where it is primarily used, in BLE_STACK_HANDLER_INIT(), space is allocated like this:
static uint32_t EVT_BUFFER[CEIL_DIV(sizeof(ble_evt_t) + (MTU_SIZE), sizeof(uint32_t))];
This makes sure that sufficient space will actually be allocated, since the MTU_SIZE is added to the sizeof(ble_evt_t), exactly to accommodate the variable size arrays that are part of several events.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4301?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2013 16:06:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cab3a87-457c-466e-aace-6403255c76c3</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;One more thing: if array has predefined length then it needs to be less than uint16_t len;
/* Length of the incoming data. */.&lt;/p&gt;
&lt;p&gt;The way I see the intention of the developer is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;typedef union {
unit8_t event_x[1];  /* event x message */
uint16_t event_y[2];/* event y message */
void *event_z; /* event z message */
/* more event messages if necessary */
} event_message_t; /* union will have the size of known largest message */
struct
{
...
uint16_t len; /* Length of the incoming data; len &amp;lt;= sizeof(event_message_t); */
event_message_t data;
}ble_gatts_evt_write_t;

&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4294?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2013 13:02:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e83d0e2-1c8d-4a74-a80f-9ba018ce4ea0</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;Sorry Ole, I&amp;#39;m not satisfied.  some_t data[X] allocates memory for X elements of some_t, in our case uint8_t data[1] allocates exactly one byte. Yet the comment says variable length! Is this not confusing? One needs to choose array of predefine length of exact or max_len size or void pointer which application will cast to the necessary type.
Once again I&amp;#39;m finding existing typedef including  its comment confusing: If one has more then one write event and they do have different length of writing data then more then one typedef will be required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Confusing definition</title><link>https://devzone.nordicsemi.com/thread/4293?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2013 10:57:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f3dfa6d-3605-4017-ad72-d6bc63a9d00f</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;The point of this declaration is that the array is actually located here, and it&amp;#39;s not just a pointer to another area. In C99, you would write this as data[], but this is not legal in C89, hence this [1].&lt;/p&gt;
&lt;p&gt;Having it like this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
struct
{
    uint8_t * data;
} ble_gatts_evt_write_t;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;would imply there is just a pointer to some other memory area in the actual event structure, while this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
struct
{
    uint8_t data[]; // or data[1] in C89
} ble_gatts_evt_write_t;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;shows that the entire data is actually located in this memory area.&lt;/p&gt;
&lt;p&gt;Initially, it was a requirement for the softdevice headers to be C89 compliant, and even though we&amp;#39;ve abandoned this, some things like this still lingers in the code. However, when using this buffer, these two declarations are mostly equivalent, although it may matter in case you need to copy the structure.&lt;/p&gt;
&lt;p&gt;It seems to me that &lt;a href="http://eli.thegreenplace.net/2009/10/21/are-pointers-and-arrays-equivalent-in-c/"&gt;this blog post&lt;/a&gt; explains the difference between a pointer and an array in a good way, if the difference is still unclear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>