Skip to content

Commit

Permalink
Merge pull request #614 from Zalewa/fix-text
Browse files Browse the repository at this point in the history
Fix minor text issues
  • Loading branch information
coolo authored Dec 30, 2022
2 parents e3603ef + b9fa653 commit 9d397ef
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
12 changes: 6 additions & 6 deletions client/argv.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ dupargv (char * const *argv)
{
int argc;
char **copy;

if (argv == NULL)
return NULL;

/* the vector */
for (argc = 0; argv[argc] != NULL; argc++);
copy = (char **) malloc ((argc + 1) * sizeof (char *));
Expand Down Expand Up @@ -392,11 +392,11 @@ expandargv (int *argcp, char ***argvp)
/* Free the original options memory. */
free((*argvp)[i]);
/* Now, insert FILE_ARGV into ARGV. The "+1" below handles the
NULL terminator at the end of ARGV. */
*argvp = ((char **)
realloc (*argvp,
NULL terminator at the end of ARGV. */
*argvp = ((char **)
realloc (*argvp,
(*argcp + file_argc + 1) * sizeof (char *)));
memmove (*argvp + i + file_argc, *argvp + i + 1,
memmove (*argvp + i + file_argc, *argvp + i + 1,
(*argcp - i) * sizeof (char *));
memcpy (*argvp + i, file_argv, file_argc * sizeof (char *));
/* The original option has been replaced by all the new
Expand Down
4 changes: 2 additions & 2 deletions client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ extern Environments parse_icecc_version(const std::string &target, const std::st
class client_error : public std::runtime_error
{
public:
client_error(int code, const std::string& what)
client_error(int code, const std::string& what)
: std::runtime_error(what)
, errorCode(code)
{}
Expand All @@ -101,7 +101,7 @@ class client_error : public std::runtime_error
class remote_error : public client_error
{
public:
remote_error(int code, const std::string& what)
remote_error(int code, const std::string& what)
: client_error(code, what)
{}
};
Expand Down
4 changes: 2 additions & 2 deletions client/local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ int build_local(CompileJob &job, MsgChannel *local_daemon, struct rusage *used)
arguments.push_back(job.outputFile());
}

vector<char*> argv;
vector<char*> argv;
string argstxt;

for (list<string>::const_iterator it = arguments.begin(); it != arguments.end(); ++it) {
Expand Down Expand Up @@ -423,7 +423,7 @@ int build_local(CompileJob &job, MsgChannel *local_daemon, struct rusage *used)
char buf[250];

for (;;) {
int r;
int r;
while ((r = read(pf[0], buf, sizeof(buf) - 1)) > 0) {
buf[r] = '\0';
s_ccout.append(buf);
Expand Down
2 changes: 1 addition & 1 deletion daemon/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ bool Daemon::setup_listen_unix_fd()
strncpy(myaddr.sun_path, default_socket.c_str() , sizeof(myaddr.sun_path) - 1);
myaddr.sun_path[sizeof(myaddr.sun_path) - 1] = '\0';
if(default_socket.length() > sizeof(myaddr.sun_path) - 1) {
log_error() << "default socket path too long for sun_path" << endl;
log_error() << "default socket path too long for sun_path" << endl;
}
if (-1 == unlink(myaddr.sun_path) && errno != ENOENT){
log_perror("unlink failed") << "\t" << myaddr.sun_path << endl;
Expand Down
5 changes: 3 additions & 2 deletions scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ static list<CompileServer *> filter_ineligible_servers(Job *job)
trace() << cs->nodeName() << " fails remote job check\n";
return false;
}

return true;
});
return eligible;
Expand Down Expand Up @@ -929,7 +929,8 @@ static CompileServer *pick_server(Job *job, SchedulerAlgorithmName schedulerAlgo
<< " load: "
<< selected->load()
<< " can install: "
<< selected->can_install(job);
<< selected->can_install(job)
<< endl;
return selected;
}

Expand Down
2 changes: 1 addition & 1 deletion services/comm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ bool MsgChannel::update_state()
}

case HAS_MSG:
/* handled elsewere */
/* handled elsewhere */
break;

case ERROR:
Expand Down
6 changes: 3 additions & 3 deletions services/comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,10 @@ class DiscoverSched
}

/* Attempt to get a conenction to the scheduler.
Continue to call this while it returns NULL and timed_out()
Continue to call this while it returns NULL and timed_out()
returns false. If this returns NULL you should wait for either
more data on listen_fd() (use select), or a timeout of your own.
more data on listen_fd() (use select), or a timeout of your own.
*/
MsgChannel *try_get_scheduler();

Expand Down

0 comments on commit 9d397ef

Please sign in to comment.