mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-11-22 05:35:46 +00:00
Rename CPEXX_VER to cpeXX_ver and remove CPEXX_NATTR, which is redundant.
This commit is contained in:
parent
479ffbba4a
commit
35d982ea57
2 changed files with 6 additions and 10 deletions
|
@ -30,14 +30,9 @@
|
||||||
#ifndef CRYB_CPE_H_INCLUDED
|
#ifndef CRYB_CPE_H_INCLUDED
|
||||||
#define CRYB_CPE_H_INCLUDED
|
#define CRYB_CPE_H_INCLUDED
|
||||||
|
|
||||||
#define CPE22_VER 202
|
|
||||||
#define CPE22_NATTR 7
|
|
||||||
|
|
||||||
#define CPE23_VER 203
|
|
||||||
#define CPE23_NATTR 11
|
|
||||||
|
|
||||||
#define cpe_name cryb_cpe_name
|
#define cpe_name cryb_cpe_name
|
||||||
|
|
||||||
|
#define cpe22_ver 202
|
||||||
enum cpe22_attributes {
|
enum cpe22_attributes {
|
||||||
/* CPE 2.2 attributes */
|
/* CPE 2.2 attributes */
|
||||||
cpe22_part,
|
cpe22_part,
|
||||||
|
@ -51,6 +46,7 @@ enum cpe22_attributes {
|
||||||
cpe22_nattr
|
cpe22_nattr
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define cpe23_ver 203
|
||||||
enum cpe23_attributes {
|
enum cpe23_attributes {
|
||||||
/* CPE 2.2 attributes */
|
/* CPE 2.2 attributes */
|
||||||
cpe23_part = cpe22_part,
|
cpe23_part = cpe22_part,
|
||||||
|
|
|
@ -103,8 +103,8 @@ cpe_new(void)
|
||||||
|
|
||||||
if ((ncpe = calloc(1, sizeof *ncpe)) == NULL)
|
if ((ncpe = calloc(1, sizeof *ncpe)) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
ncpe->ver = CPE23_VER;
|
ncpe->ver = cpe23_ver;
|
||||||
ncpe->nattr = CPE23_NATTR;
|
ncpe->nattr = cpe23_nattr;
|
||||||
return (ncpe);
|
return (ncpe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,10 +145,10 @@ cpe_upgrade(const struct cpe_name *cpe)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (cpe->ver) {
|
switch (cpe->ver) {
|
||||||
case CPE22_VER:
|
case cpe22_ver:
|
||||||
/* already latest */
|
/* already latest */
|
||||||
return (cpe_clone(cpe));
|
return (cpe_clone(cpe));
|
||||||
case CPE23_VER:
|
case cpe23_ver:
|
||||||
return (cpe_upgrade22(cpe));
|
return (cpe_upgrade22(cpe));
|
||||||
default:
|
default:
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
Loading…
Reference in a new issue