Permalink
Browse files

Fix a couple of compiler warnings.

Reviewed by Craig Silverstein.
  • Loading branch information...
1 parent d21527c commit b6bf948082442071b68bd6a5330520c83b132da6 fergus.henderson committed Oct 21, 2011
Showing with 4 additions and 3 deletions.
  1. +3 −2 popt/popthelp.c
  2. +1 −1 src/dotd.c
View
@@ -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@*/
View
@@ -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;
}

0 comments on commit b6bf948

Please sign in to comment.