Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Mareš
compctl-kam
Commits
6443fa05
Commit
6443fa05
authored
Mar 07, 2012
by
Petr Baudis
Browse files
compctld: Remove bogus usage of sizeof() on strings
parent
0222727f
Changes
1
Hide whitespace changes
Inline
Side-by-side
compctld.c
View file @
6443fa05
...
...
@@ -16,7 +16,7 @@
#include "common.h"
#define begins_with(s_, a_) (!strncmp(s_, a_, s
izeof(s_) - 1
))
#define begins_with(s_, a_) (!strncmp(s_, a_, s
trlen(s_)
))
void
...
...
@@ -206,7 +206,7 @@ sockerror:
mprintf
(
fd
,
"1 blessed"
);
}
else
if
(
begins_with
(
"stop "
,
line
))
{
pid_t
pid
=
atoi
(
line
+
s
izeof
(
"stop "
));
pid_t
pid
=
atoi
(
line
+
s
trlen
(
"stop "
));
/* Sanity check. */
if
(
pid
<
10
||
pid
>
32768
)
{
...
...
@@ -243,7 +243,7 @@ sockerror:
free
(
tasks
);
}
else
if
(
begins_with
(
"limitmem "
,
line
))
{
size_t
limit
=
atol
(
line
+
s
izeof
(
"limitmem "
));
size_t
limit
=
atol
(
line
+
s
trlen
(
"limitmem "
));
size_t
minuser
,
mincomp
,
maxcomp
,
total
;
memory_limits
(
&
minuser
,
&
mincomp
,
&
maxcomp
,
&
total
);
...
...
Write
Preview
Supports
Markdown
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