]> andersk Git - splint.git/blame - test/manual/updateMyEnvGood.c
Renamed lclintMacros.nf splintMacros.nf
[splint.git] / test / manual / updateMyEnvGood.c
CommitLineData
f8f5727a 1#include<string.h>
2#include<stdlib.h>
3
4
5void updateMyEnv2(char * str) /*@requires maxSet(str) >= 1000@*/
6{
7 char * tmp;
8 tmp = getenv("MYENV");
9 if (tmp != NULL)
10 {
11 strncpy (str, tmp, 999);
12 str[999] = '/0';
13 }
14}
15
16void updateMyEnv3(char * str, size_t strSize) /*@requires maxSet(str) >= (strSize -1)@*/
17{
18 char * tmp;
19 tmp = getenv("MYENV");
20 if (tmp != NULL)
21 {
22 strncpy (str, tmp, strSize -1);
23 str[strSize -1] = '/0';
24 }
25}
This page took 0.054534 seconds and 5 git commands to generate.