Feature #1283 » 0033-dataio_raw.-ch-Replace-NULL-with-nullptr.patch
common/networking/dataio_raw.c | ||
---|---|---|
#include "dataio.h"
|
||
static bool get_conv(char *dst, size_t ndst, const char *src,
|
||
size_t nsrc);
|
||
size_t nsrc);
|
||
static DIO_PUT_CONV_FUN put_conv_callback = NULL;
|
||
static DIO_PUT_CONV_FUN put_conv_callback = nullptr;
|
||
static DIO_GET_CONV_FUN get_conv_callback = get_conv;
|
||
/* Uncomment to make field range tests to asserts, fatal with -F */
|
||
... | ... | |
bad. This is default get_conv_callback.
|
||
**************************************************************************/
|
||
static bool get_conv(char *dst, size_t ndst, const char *src,
|
||
size_t nsrc)
|
||
size_t nsrc)
|
||
{
|
||
size_t len = nsrc; /* length to copy, not including null */
|
||
size_t len = nsrc; /* Length to copy, not including null */
|
||
bool ret = TRUE;
|
||
if (ndst > 0 && len >= ndst) {
|
||
... | ... | |
buffer size.
|
||
**************************************************************************/
|
||
void dio_output_init(struct raw_data_out *dout, void *destination,
|
||
size_t dest_size)
|
||
size_t dest_size)
|
||
{
|
||
dout->dest = destination;
|
||
dout->dest_size = dest_size;
|
||
... | ... | |
}
|
||
/**********************************************************************//**
|
||
Insert NULL-terminated string. Conversion callback is used if set.
|
||
Insert nullptr-terminated string. Conversion callback is used if set.
|
||
**************************************************************************/
|
||
int dio_put_string_raw(struct raw_data_out *dout, const char *value)
|
||
{
|
||
... | ... | |
out->kind = PADR_FIELD;
|
||
out->name = name;
|
||
out->sub_location = NULL;
|
||
out->sub_location = nullptr;
|
||
return out;
|
||
}
|
||
... | ... | |
out->kind = PADR_ELEMENT;
|
||
out->number = number;
|
||
out->sub_location = NULL;
|
||
out->sub_location = nullptr;
|
||
return out;
|
||
}
|
||
... | ... | |
{
|
||
static char locname[10];
|
||
if (loc == NULL) {
|
||
if (loc == nullptr) {
|
||
return "No location";
|
||
}
|
||
common/networking/dataio_raw.h | ||
---|---|---|
/* If the full address is to a location inside this this field should
|
||
* point to it. If this location is the final location this field should
|
||
* be NULL. */
|
||
* be nullptr. */
|
||
struct plocation *sub_location;
|
||
};
|
||
- « Previous
- 1
- 2
- Next »