summaryrefslogtreecommitdiffstats
path: root/src/util/profile
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/profile')
-rw-r--r--src/util/profile/prof_file.c2
-rw-r--r--src/util/profile/prof_init.c2
-rw-r--r--src/util/profile/profile.swg8
-rw-r--r--src/util/profile/profile_tcl.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c
index 44d63a8baa..c6f15fee59 100644
--- a/src/util/profile/prof_file.c
+++ b/src/util/profile/prof_file.c
@@ -228,7 +228,7 @@ errcode_t profile_open_file(const_profile_filespec_t filespec,
expanded_filename = malloc(len);
if (expanded_filename == 0) {
free(prf);
- return errno;
+ return ENOMEM;
}
if (home_env) {
strcpy(expanded_filename, home_env);
diff --git a/src/util/profile/prof_init.c b/src/util/profile/prof_init.c
index e5c6f9c8c5..9a5659a8ce 100644
--- a/src/util/profile/prof_init.c
+++ b/src/util/profile/prof_init.c
@@ -90,7 +90,7 @@ profile_copy(profile_t old_profile, profile_t *new_profile)
COUNT_LINKED_LIST (size, prf_file_t, old_profile->first_file, next);
files = malloc ((size+1) * sizeof(*files));
if (files == NULL)
- return errno;
+ return ENOMEM;
for (i = 0, file = old_profile->first_file; i < size; i++, file = file->next)
files[i] = file->data->filespec;
files[size] = NULL;
diff --git a/src/util/profile/profile.swg b/src/util/profile/profile.swg
index 2e75bb4c6d..074a97b9ef 100644
--- a/src/util/profile/profile.swg
+++ b/src/util/profile/profile.swg
@@ -1,6 +1,6 @@
%{
/*
- * Copyright 2004 by the Massachusetts Institute of Technology.
+ * Copyright 2004, 2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -204,7 +204,7 @@ static errcode_t iter_create(profile_t p, const char **nullterm,
it = malloc(sizeof(*it));
if (it == NULL)
- return errno;
+ return ENOMEM;
{
/* Memory leak!
@@ -218,11 +218,11 @@ static errcode_t iter_create(profile_t p, const char **nullterm,
for (count = 0; nullterm[count]; count++) ;
args = calloc(count+1, sizeof(char *));
if (args == NULL)
- return errno;
+ return ENOMEM;
for (j = 0; j < count; j++) {
args[j] = strdup(nullterm[j]);
if (args[j] == NULL)
- return errno;
+ return ENOMEM;
}
args[j] = NULL;
}
diff --git a/src/util/profile/profile_tcl.c b/src/util/profile/profile_tcl.c
index 31a82f1b41..6a2476e47b 100644
--- a/src/util/profile/profile_tcl.c
+++ b/src/util/profile/profile_tcl.c
@@ -1124,7 +1124,7 @@ static errcode_t iter_create(profile_t p, const char **nullterm,
it = malloc(sizeof(*it));
if (it == NULL)
- return errno;
+ return ENOMEM;
{
/* Memory leak!
@@ -1138,11 +1138,11 @@ static errcode_t iter_create(profile_t p, const char **nullterm,
for (count = 0; nullterm[count]; count++) ;
args = calloc(count+1, sizeof(char *));
if (args == NULL)
- return errno;
+ return ENOMEM;
for (j = 0; j < count; j++) {
args[j] = strdup(nullterm[j]);
if (args[j] == NULL)
- return errno;
+ return ENOMEM;
}
args[j] = NULL;
}