roken: Fix warnings
This commit is contained in:
@@ -440,16 +440,18 @@ rk_strrasvisx(char **out,
|
||||
return -1;
|
||||
}
|
||||
if (have < want) {
|
||||
if ((s = realloc(*out, want)) == NULL)
|
||||
if ((s = realloc(s, want)) == NULL)
|
||||
return -1;
|
||||
*outsz = want;
|
||||
*out = s;
|
||||
}
|
||||
if (*out == NULL) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
**out = '\0'; /* Makes source debugging nicer, that's all */
|
||||
if ((r = strsvisx(*out, csrc, len, flag, extra)) < 0)
|
||||
return r;
|
||||
errno = *out ? errno : EINVAL;
|
||||
return *out ? r : -1;
|
||||
r = strsvisx(*out, csrc, len, flag, extra);
|
||||
return r;
|
||||
}
|
||||
|
||||
#if !HAVE_VIS
|
||||
@@ -641,6 +643,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
free(nextra);
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user