From 2a21b01b0e3e939b1d6a5f921d36ee2edc08f015 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 8 Nov 1995 23:43:51 +0000 Subject: [PATCH] fixed bug occuring when diagnostic is printed and the env var cant be found --- src/libCom/env/envSubr.c | 11 ++++++++--- src/libCom/envSubr.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/libCom/env/envSubr.c b/src/libCom/env/envSubr.c index 9c664c190..8b4510669 100644 --- a/src/libCom/env/envSubr.c +++ b/src/libCom/env/envSubr.c @@ -32,6 +32,8 @@ * vars under vxWorks * .05 04-20-95 anj changes to use CONFIG_ENV * .06 05-24-95 joh added return stmnt to epicsPrtEnvParams() + * .07 11-03-96 joh fixed bug occuring when diagnostic is + * printed and the env var cant be found * * make options * -DvxWorks makes a version for VxWorks @@ -195,8 +197,9 @@ double *pDouble; /* O pointer to place to store value */ if (count == 1) { return 0; } + (void)printf("Unable to find a real number in %s=%s\n", + pParam->name, text); } - (void)printf("illegal value for %s:%s\n", pParam->name, text); return -1; } @@ -250,8 +253,9 @@ struct in_addr *pAddr; /* O pointer to struct to receive inet addr */ pAddr->s_addr = status; return 0; } + (void)printf("Unable to find an IP address in %s=%s\n", + pParam->name, text); } - (void)printf("illegal value for %s:%s\n", pParam->name, text); return -1; } @@ -303,8 +307,9 @@ long *pLong; /* O pointer to place to store value */ count = sscanf(text, "%ld", pLong); if (count == 1) return 0; + (void)printf("Unable to find an integer in %s=%s\n", + pParam->name, text); } - (void)printf("illegal value for %s:%s\n", pParam->name, text); return -1; } diff --git a/src/libCom/envSubr.c b/src/libCom/envSubr.c index 9c664c190..8b4510669 100644 --- a/src/libCom/envSubr.c +++ b/src/libCom/envSubr.c @@ -32,6 +32,8 @@ * vars under vxWorks * .05 04-20-95 anj changes to use CONFIG_ENV * .06 05-24-95 joh added return stmnt to epicsPrtEnvParams() + * .07 11-03-96 joh fixed bug occuring when diagnostic is + * printed and the env var cant be found * * make options * -DvxWorks makes a version for VxWorks @@ -195,8 +197,9 @@ double *pDouble; /* O pointer to place to store value */ if (count == 1) { return 0; } + (void)printf("Unable to find a real number in %s=%s\n", + pParam->name, text); } - (void)printf("illegal value for %s:%s\n", pParam->name, text); return -1; } @@ -250,8 +253,9 @@ struct in_addr *pAddr; /* O pointer to struct to receive inet addr */ pAddr->s_addr = status; return 0; } + (void)printf("Unable to find an IP address in %s=%s\n", + pParam->name, text); } - (void)printf("illegal value for %s:%s\n", pParam->name, text); return -1; } @@ -303,8 +307,9 @@ long *pLong; /* O pointer to place to store value */ count = sscanf(text, "%ld", pLong); if (count == 1) return 0; + (void)printf("Unable to find an integer in %s=%s\n", + pParam->name, text); } - (void)printf("illegal value for %s:%s\n", pParam->name, text); return -1; }