Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
69
Issues
69
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
dhcp
Commits
b5b7abf8
Commit
b5b7abf8
authored
Jul 31, 1999
by
Ted Lemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change behaviour of concat so that any null argument produces a null result.
parent
6499fe27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
common/dhcp-eval.5
common/dhcp-eval.5
+3
-3
common/tree.c
common/tree.c
+5
-5
No files found.
common/dhcp-eval.5
View file @
b5b7abf8
...
...
@@ -243,9 +243,9 @@ specified as a data expression.
.B concat (\fIdata-expr1\fB, ..., \fIdata-exprN\fB)\fR
.RS 0.25i
The expressions are evaluated, and the results of each evaluation are
concatenated in the sequence that the subexpressions are listed.
Any
subexpression that evaluates to null is treated as a zero-length string.
If all the arguments to concat are null, the result is also
null.
concatenated in the sequence that the subexpressions are listed.
If
any subexpression evaluates to null, the result of the concatenation
is
null.
.RE
.PP
.B reverse (\fInumeric-expr1\fB, \fIdata-expr2\fB)\fR
...
...
common/tree.c
View file @
b5b7abf8
...
...
@@ -22,7 +22,7 @@
#ifndef lint
static
char
copyright
[]
=
"$Id: tree.c,v 1.4
4 1999/07/31 20:23:19
mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: tree.c,v 1.4
5 1999/07/31 23:24:32
mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
...
...
@@ -894,18 +894,18 @@ int evaluate_data_expression (result, packet, lease,
memcpy
(
&
result
->
data
[
data
.
len
],
other
.
data
,
other
.
len
+
other
.
terminated
);
}
else
if
(
s0
)
data_string_
copy
(
result
,
&
data
,
"expr_concat"
);
data_string_
forget
(
&
data
,
"expr_concat"
);
else
if
(
s1
)
data_string_
copy
(
result
,
&
other
,
"expr_concat"
);
data_string_
forget
(
&
other
,
"expr_concat"
);
#if defined (DEBUG_EXPRESSIONS)
log_debug
(
"data: concat (%s, %s) = %s"
,
s0
?
print_hex_1
(
data
.
len
,
data
.
data
,
20
)
:
"NULL"
,
s1
?
print_hex_2
(
other
.
len
,
other
.
data
,
20
)
:
"NULL"
,
((
s0
||
s1
)
((
s0
&&
s1
)
?
print_hex_3
(
result
->
len
,
result
->
data
,
30
)
:
"NULL"
));
#endif
return
s0
||
s1
;
return
s0
&&
s1
;
case
expr_encode_int8
:
s0
=
evaluate_numeric_expression
(
&
len
,
packet
,
lease
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment