From: Jens Axboe Date: Thu, 9 Feb 2012 20:17:06 +0000 (+0100) Subject: Fix a few other static code checker spotted "issues" X-Git-Tag: fio-2.0.4~41 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=cc62ea704e4de10eb595b551f29af41266cf225d;hp=e721c57fc77e0155bb73a2c266dba0c6ce0bd3b5 Fix a few other static code checker spotted "issues" Signed-off-by: Jens Axboe --- diff --git a/crc/crc32c-intel.c b/crc/crc32c-intel.c index 969a037f..5040efea 100644 --- a/crc/crc32c-intel.c +++ b/crc/crc32c-intel.c @@ -28,8 +28,8 @@ #define SCALE_F 4 #endif -uint32_t crc32c_intel_le_hw_byte(uint32_t crc, unsigned char const *data, - unsigned long length) +static uint32_t crc32c_intel_le_hw_byte(uint32_t crc, unsigned char const *data, + unsigned long length) { while (length--) { __asm__ __volatile__( diff --git a/fifo.c b/fifo.c index de031841..81d13b57 100644 --- a/fifo.c +++ b/fifo.c @@ -31,7 +31,7 @@ struct fifo *fifo_alloc(unsigned int size) fifo = malloc(sizeof(struct fifo)); if (!fifo) - return 0; + return NULL; fifo->buffer = malloc(size); fifo->size = size; diff --git a/parse.c b/parse.c index 6ea7c103..f1d5f8f8 100644 --- a/parse.c +++ b/parse.c @@ -220,7 +220,7 @@ static unsigned long long get_mult_bytes(const char *str, int len, void *data, /* * Convert string into a floating number. Return 1 for success and 0 otherwise. */ -int str_to_float(const char *str, double *val) +static int str_to_float(const char *str, double *val) { return (1 == sscanf(str, "%lf", val)); }