- Timestamp:
- Jun 10, 2007, 1:12:12 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/src/libos2/safe/SafeDosStartSession.c
r1756 r3384 84 84 if (SAFE_IS_HIGH(Environment)) 85 85 { 86 l4 = strlen((const char *)Environment) + 1; 86 const char *psz = Environment; 87 while (*psz) 88 psz = strchr(psz, '\0') + 1; 89 l4 = psz - Environment + 1; 87 90 cbSafe += l4; 88 91 } … … 149 152 pchSafeMem = NULL; 150 153 151 rc = DosStartSession(psd, &ulIdSession, &pid); 154 rc = DosStartSession(psd, 155 pulIdSession ? &ulIdSession : NULL, 156 ppid ? &pid : NULL); 152 157 153 158 /** @todo One should *NOT* modify the input structure but make a COPY!!! */ … … 160 165 psd->IconFile = IconFile; 161 166 162 /* S ave returnedvalues */167 /* Set return values */ 163 168 if (ObjectBuffLen) 164 169 memcpy(ObjectBuffer, psd->ObjectBuffer, ObjectBuffLen); 165 170 psd->ObjectBuffer = ObjectBuffer; 171 if (pulIdSession) 166 172 *pulIdSession = ulIdSession; 173 if (ppid) 167 174 *ppid = pid; 168 175 169 if (pchSafeMem) free( pchSafeMem ); 176 /* cleanup and return. */ 177 if (pchSafeMem) 178 free(pchSafeMem); 170 179 return rc; 171 180
Note:
See TracChangeset
for help on using the changeset viewer.