Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
net-tools
Commits
c58d03b8
Commit
c58d03b8
authored
Aug 29, 2015
by
Mike Frysinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
statistics: constify strings
Mark all the read-only strings in this file as const.
parent
9c4b23a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
statistics.c
statistics.c
+7
-7
No files found.
statistics.c
View file @
c58d03b8
...
...
@@ -23,14 +23,14 @@ enum State {
#define normal number
struct
entry
{
char
*
title
;
c
onst
c
har
*
title
;
char
*
out
;
enum
State
type
;
};
struct
statedesc
{
int
indent
;
char
*
title
;
c
onst
c
har
*
title
;
};
static
struct
statedesc
states
[]
=
{
...
...
@@ -292,7 +292,7 @@ static struct entry Tcpexttab[] =
};
struct
tabtab
{
char
*
title
;
c
onst
c
har
*
title
;
struct
entry
*
tab
;
size_t
size
;
int
*
flag
;
...
...
@@ -324,7 +324,7 @@ static int cmpentries(const void *a, const void *b)
return
strcmp
(((
struct
entry
*
)
a
)
->
title
,
((
struct
entry
*
)
b
)
->
title
);
}
static
void
printval
(
struct
tabtab
*
tab
,
char
*
title
,
unsigned
long
long
val
)
static
void
printval
(
struct
tabtab
*
tab
,
c
onst
c
har
*
title
,
unsigned
long
long
val
)
{
struct
entry
*
ent
=
NULL
,
key
;
int
type
;
...
...
@@ -382,7 +382,7 @@ static void printval(struct tabtab *tab, char *title, unsigned long long val)
state
=
type
;
}
static
struct
tabtab
*
newtable
(
struct
tabtab
*
tabs
,
char
*
title
)
static
struct
tabtab
*
newtable
(
struct
tabtab
*
tabs
,
c
onst
c
har
*
title
)
{
struct
tabtab
*
t
;
static
struct
tabtab
dummytab
;
...
...
@@ -457,9 +457,9 @@ formaterr:
return
-
1
;
}
static
void
cpytitle
(
char
*
original
,
char
*
new
)
static
void
cpytitle
(
c
onst
c
har
*
original
,
char
*
new
)
{
char
*
ptr
=
original
;
c
onst
c
har
*
ptr
=
original
;
while
(
*
ptr
!=
'6'
&&
*
ptr
!=
'\0'
)
{
*
new
=
*
ptr
;
new
++
;
...
...
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