mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 04:13:32 +02:00
Fixed one error and several warnings with GLIB 2.0
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2663 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
ec168a4009
commit
bd00ff54c2
7 changed files with 23 additions and 16 deletions
|
|
@ -39,6 +39,7 @@ static char **session_args;
|
|||
|
||||
void session_set_binary(const char *path)
|
||||
{
|
||||
const char *envpath;
|
||||
char **paths, **tmp;
|
||||
char *str;
|
||||
|
||||
|
|
@ -59,10 +60,10 @@ void session_set_binary(const char *path)
|
|||
}
|
||||
|
||||
/* we'll need to find it from path. */
|
||||
str = g_getenv("PATH");
|
||||
if (str == NULL) return;
|
||||
envpath = g_getenv("PATH");
|
||||
if (envpath == NULL) return;
|
||||
|
||||
paths = g_strsplit(str, ":", -1);
|
||||
paths = g_strsplit(envpath, ":", -1);
|
||||
for (tmp = paths; *tmp != NULL; tmp++) {
|
||||
str = g_strconcat(*tmp, G_DIR_SEPARATOR_S, path, NULL);
|
||||
if (access(str, X_OK) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue