Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Vidal
66
Commits
5a8e98b0
Commit
5a8e98b0
authored
5 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
pass to local variable
parent
0a7b5f13
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/66/66-inservice.c
+8
-7
8 additions, 7 deletions
src/66/66-inservice.c
with
8 additions
and
7 deletions
src/66/66-inservice.c
+
8
−
7
View file @
5a8e98b0
/*
/*
* 66-in
tre
e.c
* 66-in
servic
e.c
*
*
* Copyright (c) 2018-2019 Eric Vidal <eric@obarun.org>
* Copyright (c) 2018-2019 Eric Vidal <eric@obarun.org>
*
*
...
@@ -50,8 +50,6 @@ unsigned int VERBOSITY = 1 ;
...
@@ -50,8 +50,6 @@ unsigned int VERBOSITY = 1 ;
static
unsigned
int
REVERSE
=
0
;
static
unsigned
int
REVERSE
=
0
;
unsigned
int
MAXDEPTH
=
1
;
unsigned
int
MAXDEPTH
=
1
;
static
unsigned
int
GRAPH
=
0
;
static
unsigned
int
GRAPH
=
0
;
static
uid_t
OWNER
;
static
char
OWNERSTR
[
UID_FMT
]
;
static
char
const
*
const
*
ENVP
;
static
char
const
*
const
*
ENVP
;
static
unsigned
int
nlog
=
20
;
static
unsigned
int
nlog
=
20
;
static
stralloc
src
=
STRALLOC_ZERO
;
static
stralloc
src
=
STRALLOC_ZERO
;
...
@@ -526,6 +524,9 @@ int main(int argc, char const *const *argv, char const *const *envp)
...
@@ -526,6 +524,9 @@ int main(int argc, char const *const *argv, char const *const *envp)
size_t
pos
,
newlen
;
size_t
pos
,
newlen
;
int
what
[
MAXOPTS
]
=
{
0
}
;
int
what
[
MAXOPTS
]
=
{
0
}
;
uid_t
owner
;
char
ownerstr
[
UID_FMT
]
;
ss_resolve_t
res
=
RESOLVE_ZERO
;
ss_resolve_t
res
=
RESOLVE_ZERO
;
stralloc
satree
=
STRALLOC_ZERO
;
stralloc
satree
=
STRALLOC_ZERO
;
...
@@ -595,9 +596,9 @@ int main(int argc, char const *const *argv, char const *const *envp)
...
@@ -595,9 +596,9 @@ int main(int argc, char const *const *argv, char const *const *envp)
what
[
i
]
=
-
1
;
what
[
i
]
=
-
1
;
}
}
OWNER
=
getuid
()
;
owner
=
getuid
()
;
size_t
ownerlen
=
uid_fmt
(
OWNERSTR
,
OWNER
)
;
size_t
ownerlen
=
uid_fmt
(
ownerstr
,
owner
)
;
OWNERSTR
[
ownerlen
]
=
0
;
ownerstr
[
ownerlen
]
=
0
;
info_field_align
(
buf
,
fields
,
field_suffix
,
MAXOPTS
)
;
info_field_align
(
buf
,
fields
,
field_suffix
,
MAXOPTS
)
;
...
@@ -607,7 +608,7 @@ int main(int argc, char const *const *argv, char const *const *envp)
...
@@ -607,7 +608,7 @@ int main(int argc, char const *const *argv, char const *const *envp)
STYLE
=
&
graph_utf8
;
STYLE
=
&
graph_utf8
;
}
}
if
(
!
set_ownersysdir
(
&
src
,
OWNER
))
strerr_diefu1sys
(
111
,
"set owner directory"
)
;
if
(
!
set_ownersysdir
(
&
src
,
owner
))
strerr_diefu1sys
(
111
,
"set owner directory"
)
;
if
(
!
stralloc_cats
(
&
src
,
SS_SYSTEM
)
||
if
(
!
stralloc_cats
(
&
src
,
SS_SYSTEM
)
||
!
stralloc_0
(
&
src
))
exitstralloc
(
"main"
)
;
!
stralloc_0
(
&
src
))
exitstralloc
(
"main"
)
;
src
.
len
--
;
src
.
len
--
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment