Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
14b6bc2c
Commit
14b6bc2c
authored
Apr 16, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stylistic fixes.
parent
582f234e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
ChangeLog
ChangeLog
+4
-0
examples/eratosthenes.c
examples/eratosthenes.c
+2
-2
No files found.
ChangeLog
View file @
14b6bc2c
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.
2014-04-13 Niels Möller <nisse@lysator.liu.se>
...
...
examples/eratosthenes.c
View file @
14b6bc2c
...
...
@@ -93,7 +93,7 @@ static unsigned long *
vector_alloc
(
unsigned
long
size
)
{
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
)
{
...
...
@@ -110,7 +110,7 @@ vector_init(unsigned long *vector, unsigned long size)
unsigned
long
i
;
for
(
i
=
0
;
i
<
end
;
i
++
)
vector
[
i
]
=
~
0
;
vector
[
i
]
=
~
0
UL
;
}
static
void
...
...
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