Commit 2bc091d0 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r4133] The compiler doesn't seem to be very happy about comparing a constant

string against NULL. Use empty strings instead to keep it happier.
parent 522f78da
......@@ -70,7 +70,7 @@ typedef enum {
#define HYDU_ERR_POP(status, message) \
{ \
if (status != HYD_SUCCESS && status != HYD_GRACEFUL_ABORT) { \
if (message) \
if (strcmp(message, "")) \
HYDU_Error_printf(message); \
goto fn_fail; \
} \
......@@ -83,7 +83,7 @@ typedef enum {
{ \
status = error; \
if (status != HYD_SUCCESS && status != HYD_GRACEFUL_ABORT) { \
if (message) \
if (strcmp(message, "")) \
HYDU_Error_printf(message); \
goto fn_fail; \
} \
......@@ -96,7 +96,7 @@ typedef enum {
{ \
status = error; \
if (status != HYD_SUCCESS && status != HYD_GRACEFUL_ABORT) { \
if (message) \
if (strcmp(message, "")) \
HYDU_Error_printf(message, arg1); \
goto fn_fail; \
} \
......@@ -109,7 +109,7 @@ typedef enum {
{ \
status = error; \
if (status != HYD_SUCCESS && status != HYD_GRACEFUL_ABORT) { \
if (message) \
if (strcmp(message, "")) \
HYDU_Error_printf(message, arg1, arg2); \
goto fn_fail; \
} \
......
......@@ -66,7 +66,7 @@ int main(int argc, char **argv)
if (handle.debug) {
status = HYD_LCHI_Print_parameters();
HYDU_ERR_POP(status, NULL);
HYDU_ERR_POP(status, "");
}
/* Convert the host file to a host list */
......
......@@ -114,7 +114,7 @@ HYD_Status HYD_LCHI_Get_parameters(int t_argc, char **t_argv)
HYDU_ERR_POP(status, "string break returned error\n");
if (!strcmp(str1, "-h") || !strcmp(str1, "--help") || !strcmp(str1, "-help"))
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, NULL);
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "");
if (!strcmp(str1, "--verbose")) {
if (handle.debug != -1)
......@@ -125,7 +125,7 @@ HYD_Status HYD_LCHI_Get_parameters(int t_argc, char **t_argv)
if (!strcmp(str1, "--version")) {
show_version();
HYDU_ERR_SETANDJUMP(status, HYD_GRACEFUL_ABORT, NULL);
HYDU_ERR_SETANDJUMP(status, HYD_GRACEFUL_ABORT, "");
}
if (!strcmp(str1, "--bootstrap")) {
......
......@@ -42,7 +42,7 @@ HYD_Status HYDU_String_break(char *str, char **str1, char **str2)
HYDU_FUNC_ENTER();
if (str == NULL)
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, NULL);
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "");
*str1 = MPIU_Strdup(str);
for (i = 0; (*str1)[i] && ((*str1)[i] != '='); i++);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment