Check-in Number:
|
3390 | |
Date: |
2003-May-27 15:14:08 (local)
2003-May-27 13:14:08 (UTC) |
User: | ms |
Branch: | |
Comment: |
Clean up non BSD compiler warnings. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/rc/rc_cliopt.c 1.15 -> 1.16
--- rc_cliopt.c 2003/05/26 16:03:57 1.15
+++ rc_cliopt.c 2003/05/27 13:14:08 1.16
@@ -98,7 +98,7 @@
/* s_pBintab->pOptlist->pvData = NULL;
s_pBintab->pOptlist->pvNext = NULL;*/
- memset(m_pszOptuples, NULL, sizeof(m_pszOptuples));
+ memset(m_pszOptuples, 0L, sizeof(m_pszOptuples));
return(RC_THROW(RC_OK));
}
|
|
ossp-pkg/rc/rc_script.c 1.24 -> 1.25
--- rc_script.c 2003/05/27 13:00:22 1.24
+++ rc_script.c 2003/05/27 13:14:08 1.25
@@ -124,7 +124,7 @@
{
rc_section_t *pSec = NULL;
char *piLabstart = NULL;
- int nLabsize = NULL;
+ int nLabsize = 0;
char *piSubtemp = NULL; /* To find priority and userid in substrings */
char *piBlocend = NULL; /* Misnomer used to control section looping */
char *piStart = NULL;
|
|
ossp-pkg/rc/rc_sect.c 1.10 -> 1.11
--- rc_sect.c 2003/05/21 15:16:41 1.10
+++ rc_sect.c 2003/05/27 13:14:08 1.11
@@ -202,17 +202,17 @@
rc_return_t sectionSetndata(rc_section_t *pSec, const char *kszScript, size_t Len)
{ /* Data of section, this is the script body of the particular section */
if (pSec) {
- pSec->m_Bytes = Len * sizeof(char) + sizeof(char); /* Set size */
+ pSec->m_Bytes = (Len + 1) * sizeof(char); /* Set size */
if (pSec->m_szData) { /* The section data is already in use */
free(pSec->m_szData);
pSec->m_szData = malloc(pSec->m_Bytes);
strncpy(pSec->m_szData, kszScript, Len);
- *(pSec->m_szData + Len) = NULL; /* Terminate outgoing */
+ *(pSec->m_szData + Len) = '\0'; /* Terminate outgoing */
}
else { /* Set the data the usual way */
pSec->m_szData = malloc(pSec->m_Bytes);
strncpy(pSec->m_szData, kszScript, Len);
- *(pSec->m_szData + Len) = NULL; /* Terminate outgoing */
+ *(pSec->m_szData + Len) = '\0'; /* Terminate outgoing */
}
return(RC_THROW(RC_OK));
}
|
|