diff options
-rw-r--r-- | popt/popthelp.c | 5 | ||||
-rw-r--r-- | src/dotd.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/popt/popthelp.c b/popt/popthelp.c index e12c908..7b10061 100644 --- a/popt/popthelp.c +++ b/popt/popthelp.c @@ -678,12 +678,13 @@ static int showShortOptions(const struct poptOption * opt, FILE * fp, /*@globals fileSystem @*/ /*@modifies *str, *fp, fileSystem @*/ { - char * s = alloca(300); /* larger then the ascii set */ + size_t size = 300; /* larger then the ascii set */ + char * s = alloca(size); s[0] = '\0'; /*@-branchstate@*/ /* FIX: W2DO? */ if (str == NULL) { - memset(s, 0, sizeof(s)); + memset(s, 0, size); str = s; } /*@=branchstate@*/ @@ -103,7 +103,7 @@ int dcc_cleanup_dotd(const char *dotd_fname, } tmp_dotd = fopen(*new_dotd_fname, "w"); - if ((tmp_dotd == NULL)) { + if (tmp_dotd == NULL) { fclose(dotd); return 1; } |