Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
fb3cc4b5
Commit
fb3cc4b5
authored
Feb 13, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make fmt_bytes take an uintmax_t
parent
866b4195
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+4
-4
No files found.
bin/varnishd/mgt/mgt_param.c
View file @
fb3cc4b5
...
@@ -283,7 +283,7 @@ tweak_uint(struct cli *cli, const struct parspec *par, const char *arg)
...
@@ -283,7 +283,7 @@ tweak_uint(struct cli *cli, const struct parspec *par, const char *arg)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static
void
static
void
fmt_bytes
(
struct
cli
*
cli
,
ssize
_t
t
)
fmt_bytes
(
struct
cli
*
cli
,
uintmax
_t
t
)
{
{
const
char
*
p
;
const
char
*
p
;
...
@@ -298,7 +298,7 @@ fmt_bytes(struct cli *cli, ssize_t t)
...
@@ -298,7 +298,7 @@ fmt_bytes(struct cli *cli, ssize_t t)
}
}
t
/=
1024
;
t
/=
1024
;
if
(
t
&
0x0ff
)
{
if
(
t
&
0x0ff
)
{
VCLI_Out
(
cli
,
"%
z
u%c"
,
t
,
*
p
);
VCLI_Out
(
cli
,
"%
j
u%c"
,
t
,
*
p
);
return
;
return
;
}
}
}
}
...
@@ -324,14 +324,14 @@ tweak_generic_bytes(struct cli *cli, volatile ssize_t *dest, const char *arg,
...
@@ -324,14 +324,14 @@ tweak_generic_bytes(struct cli *cli, volatile ssize_t *dest, const char *arg,
}
}
if
((
uintmax_t
)((
ssize_t
)
r
)
!=
r
||
r
>
max
)
{
if
((
uintmax_t
)((
ssize_t
)
r
)
!=
r
||
r
>
max
)
{
VCLI_Out
(
cli
,
"Must be no more than "
);
VCLI_Out
(
cli
,
"Must be no more than "
);
fmt_bytes
(
cli
,
(
ssize
_t
)
max
);
fmt_bytes
(
cli
,
(
uintmax
_t
)
max
);
VCLI_Out
(
cli
,
"
\n
"
);
VCLI_Out
(
cli
,
"
\n
"
);
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
return
;
return
;
}
}
if
(
r
<
min
)
{
if
(
r
<
min
)
{
VCLI_Out
(
cli
,
"Must be at least "
);
VCLI_Out
(
cli
,
"Must be at least "
);
fmt_bytes
(
cli
,
(
ssize
_t
)
min
);
fmt_bytes
(
cli
,
(
uintmax
_t
)
min
);
VCLI_Out
(
cli
,
"
\n
"
);
VCLI_Out
(
cli
,
"
\n
"
);
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
return
;
return
;
...
...
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