summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-09-21 20:40:56 +0000
committerBernhard Reutner-Fischer2006-09-21 20:40:56 +0000
commit42f67026a1423247ef18cdf22669ebe4698ff7ad (patch)
treea28d0d9142cc4215835ba0e7fdd6a799b337004c
parentce32f65a1bf6561660decd92913b782fb9aafbdd (diff)
downloadbusybox-42f67026a1423247ef18cdf22669ebe4698ff7ad.zip
busybox-42f67026a1423247ef18cdf22669ebe4698ff7ad.tar.gz
- silence gcc warning about a funcptr possibly being used uninitialized.
This is a perfect example on where we should NOT care if the functor is not initialized since the result will not be what the user may expect. Safe bet would be to init to NULL, but let's try normal uu for good measure. - fix commentary typo while at it.
-rw-r--r--coreutils/uudecode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 2ec4306..b87c33d 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -36,7 +36,7 @@ static int read_stduu(FILE *src_stream, FILE *dst_stream)
}
line_ptr++;
- /* Tolerate an overly long line to acomadate a possible exta '`' */
+ /* Tolerate an overly long line to accomodate a possible exta '`' */
if (strlen(line_ptr) < (size_t)length) {
bb_error_msg_and_die("Short file");
}
@@ -125,7 +125,7 @@ static int read_base64(FILE *src_stream, FILE *dst_stream)
int uudecode_main(int argc, char **argv)
{
- int (*decode_fn_ptr) (FILE * src, FILE * dst);
+ int (*decode_fn_ptr)(FILE * src, FILE * dst) = read_stduu; /* silence gcc */
FILE *src_stream;
char *outname = NULL;
char *line;