Remove PRV_SKIPNULL flag

This commit is contained in:
Rodrigo Arias 2023-03-21 09:44:35 +01:00 committed by Rodrigo Arias Mallo
parent 4a2a9ec685
commit 9572d79f72
2 changed files with 2 additions and 7 deletions

View File

@ -99,10 +99,6 @@ emit(struct prv *prv, struct prv_chan *rchan)
if (rchan->flags & PRV_SKIPDUP) if (rchan->flags & PRV_SKIPDUP)
return 0; return 0;
int is_null = value_is_null(value);
if (rchan->flags & PRV_SKIPNULL && is_null)
return 0;
err("error duplicated value %s for channel %s\n", err("error duplicated value %s for channel %s\n",
value_str(value), chan->name); value_str(value), chan->name);
return -1; return -1;

View File

@ -14,9 +14,8 @@ struct prv;
enum prv_flags { enum prv_flags {
PRV_EMITDUP = 1<<0, /* Emit duplicates (no error, emit) */ PRV_EMITDUP = 1<<0, /* Emit duplicates (no error, emit) */
PRV_SKIPDUP = 1<<1, /* Skip duplicates (no error, no emit) */ PRV_SKIPDUP = 1<<1, /* Skip duplicates (no error, no emit) */
PRV_SKIPNULL = 1<<2, /* Skip null duplicates (no error, no emit) */ PRV_NEXT = 1<<2, /* Add one to the channel value */
PRV_NEXT = 1<<3, /* Add one to the channel value */ PRV_ZERO = 1<<3, /* Value 0 is allowed */
PRV_ZERO = 1<<4, /* Value 0 is allowed */
}; };
struct prv_chan { struct prv_chan {