Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Wim Lewis
nettle
Commits
14b6bc2c
Commit
14b6bc2c
authored
10 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Stylistic fixes.
parent
582f234e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+4
-0
4 additions, 0 deletions
ChangeLog
examples/eratosthenes.c
+2
-2
2 additions, 2 deletions
examples/eratosthenes.c
with
6 additions
and
2 deletions
ChangeLog
+
4
−
0
View file @
14b6bc2c
2014-04-16 Niels Möller <nisse@lysator.liu.se>
2014-04-16 Niels Möller <nisse@lysator.liu.se>
* examples/eratosthenes.c (vector_alloc): Use sizeof(*vector)
instead of explicit type in malloc call.
(vector_init): Make constant explicitly unsigned long.
* tools/input.c (sexp_get_quoted_char): Deleted useless for loop.
* tools/input.c (sexp_get_quoted_char): Deleted useless for loop.
2014-04-13 Niels Möller <nisse@lysator.liu.se>
2014-04-13 Niels Möller <nisse@lysator.liu.se>
...
...
This diff is collapsed.
Click to expand it.
examples/eratosthenes.c
+
2
−
2
View file @
14b6bc2c
...
@@ -93,7 +93,7 @@ static unsigned long *
...
@@ -93,7 +93,7 @@ static unsigned long *
vector_alloc
(
unsigned
long
size
)
vector_alloc
(
unsigned
long
size
)
{
{
unsigned
long
end
=
(
size
+
BITS_PER_LONG
-
1
)
/
BITS_PER_LONG
;
unsigned
long
end
=
(
size
+
BITS_PER_LONG
-
1
)
/
BITS_PER_LONG
;
unsigned
long
*
vector
=
malloc
(
end
*
sizeof
(
long
));
unsigned
long
*
vector
=
malloc
(
end
*
sizeof
(
*
vector
));
if
(
!
vector
)
if
(
!
vector
)
{
{
...
@@ -110,7 +110,7 @@ vector_init(unsigned long *vector, unsigned long size)
...
@@ -110,7 +110,7 @@ vector_init(unsigned long *vector, unsigned long size)
unsigned
long
i
;
unsigned
long
i
;
for
(
i
=
0
;
i
<
end
;
i
++
)
for
(
i
=
0
;
i
<
end
;
i
++
)
vector
[
i
]
=
~
0
;
vector
[
i
]
=
~
0
UL
;
}
}
static
void
static
void
...
...
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