diff options
| author | Neil Conway | 2004-10-10 23:37:45 +0000 |
|---|---|---|
| committer | Neil Conway | 2004-10-10 23:37:45 +0000 |
| commit | 0e72b9d4408ddb8bf3355d02e3a3e3c885357e9b (patch) | |
| tree | 94dd35531eaf8236cccb7eb146b20124a0852fc1 /src/interfaces | |
| parent | 86a39d5a196441fe0afd31bc7429842fa16c0b65 (diff) | |
Cosmetic improvements/code cleanup:
- replace some function signatures of the form "some_type foo()" with
"some_type foo(void)"
- replace a few instances of a literal 0 being used as a NULL pointer;
there are more instances of this in the code, but I just fixed a few
- in src/backend/utils/mb/wstrncmp.c, replace K&R style function
declarations with ANSI style, remove use of 'register' keyword
- remove an "extern" modifier that was applied to a function definition
(rather than a declaration)
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/ecpg/preproc/descriptor.c | 2 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/type.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/preproc/descriptor.c b/src/interfaces/ecpg/preproc/descriptor.c index 7ba6aa520d7..a89eec2780f 100644 --- a/src/interfaces/ecpg/preproc/descriptor.c +++ b/src/interfaces/ecpg/preproc/descriptor.c @@ -315,7 +315,7 @@ struct variable * descriptor_variable(const char *name, int input) { static char descriptor_names[2][MAX_DESCRIPTOR_NAMELEN]; - static const struct ECPGtype descriptor_type = {ECPGt_descriptor, 0}; + static const struct ECPGtype descriptor_type = {ECPGt_descriptor, NULL}; static const struct variable varspace[2] = { {descriptor_names[0], (struct ECPGtype *) & descriptor_type, 0, NULL}, {descriptor_names[1], (struct ECPGtype *) & descriptor_type, 0, NULL} diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index 24185222046..c55b0ae32f6 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -97,7 +97,7 @@ ECPGmake_simple_type(enum ECPGttype type, char *size) ne->type = type; ne->size = size; - ne->u.element = 0; + ne->u.element = NULL; ne->struct_sizeof = NULL; return ne; @@ -291,7 +291,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array)) mmerror(INDICATOR_NOT_SIMPLE, ET_FATAL, "Indicator for simple datatype has to be simple.\n"); - ECPGdump_a_simple(o, name, type->type, 0, make_str("-1"), NULL, prefix); + ECPGdump_a_simple(o, name, type->type, NULL, make_str("-1"), NULL, prefix); ECPGdump_a_simple(o, ind_name, ind_type->type, ind_type->size, make_str("-1"), NULL, ind_prefix); break; default: |
