Commit fe0d1b0
committed
Refactor[MQBU]: Remove unnecessary buffer from
This patch removes a statically allocated buffer `k_NULL_KEY_BUFFER`
containing five null bytes from `mqbu_storagekey`. This buffer is only
used in the default constructor for `StorageKey`, where we copy the five
null bytes into the `StorageKey`'s internal buffer. In place of this,
we `memset` the internal buffer to `\0`.
Note that elsewhere we rely on `k_NULL_KEY_BUFFER[0] == '\0'` (see
src/groups/mqb/mqbu/mqbu_storagekey.h:312), so we can't freely change
this constant later on.
Signed-off-by: Patrick M. Niedzielski <patrick@pniedzielski.net>mqbu_storagekey
1 parent 2ef4ce9 commit fe0d1b0
2 files changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 82 | | |
86 | 83 | | |
87 | 84 | | |
| |||
279 | 276 | | |
280 | 277 | | |
281 | 278 | | |
282 | | - | |
| 279 | + | |
283 | 280 | | |
284 | 281 | | |
285 | 282 | | |
| |||
0 commit comments