src
NULL_rfill.c
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>.
3
* All rights reserved.
4
* Redistribution and modifications are permitted subject to BSD license.
5
*/
6
#include <
etsi_its_cpm_ts_coding/asn_internal.h
>
7
#include <
etsi_its_cpm_ts_coding/NULL.h
>
8
9
asn_random_fill_result_t
10
NULL_random_fill
(
const
asn_TYPE_descriptor_t
*td,
void
**sptr,
11
const
asn_encoding_constraints_t
*constr,
12
size_t
max_length) {
13
asn_random_fill_result_t
result_ok = {ARFILL_OK, 1};
14
asn_random_fill_result_t
result_failed = {ARFILL_FAILED, 0};
15
asn_random_fill_result_t
result_skipped = {ARFILL_SKIPPED, 0};
16
NULL_t
*st = *sptr;
17
18
(void)td;
19
(void)constr;
20
21
if
(max_length == 0)
return
result_skipped;
22
23
if
(st == NULL) {
24
st = (
NULL_t
*)(*sptr =
CALLOC
(1,
sizeof
(*st)));
25
if
(st == NULL) {
26
return
result_failed;
27
}
28
}
29
30
return
result_ok;
31
}
CALLOC
#define CALLOC(nmemb, size)
Definition:
asn_internal.h:37
NULL.h
asn_TYPE_descriptor_s
Definition:
constr_TYPE.h:224
asn_random_fill_result_s
Definition:
asn_random_fill.h:24
NULL_random_fill
asn_random_fill_result_t NULL_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constr, size_t max_length)
Definition:
NULL_rfill.c:10
asn_encoding_constraints_s
Definition:
constr_TYPE.h:208
asn_internal.h
NULL_t
int NULL_t
Definition:
NULL.h:18
etsi_its_cpm_ts_coding
Author(s): Jean-Pierre Busch
, Guido Küppers
, Lennart Reiher
autogenerated on Sun May 18 2025 02:22:38