Age | Commit message (Collapse) | Author |
|
This commit fixes some uses of strncpy that could leave the destination
buffer unterminated.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The value 0 is a valid file descriptor. The existing error handling
would not only treat that as an error, but subsequently leak the
file descriptor in the error handling path.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
When passing a long argument, actually use labs().
The other case of passing a float to "int abs(int)" and
casting the result to an int doesn't really make sense.
Pull the cast inside the abs().
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This patch eliminates warnings generated by the -Wmissing-prototypes
option. With this flag set, we are now forced to have prototypes for
all global, exported functions, that have to be made visible to the
definitions and we are forced to mark all local functions as static.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
When a program does sophisticated enough command line processing
(i.e. getopt), make sure it responds to -V and --version.
When a program prints a version string, make sure it uses the
common_print_version macro to print out its name, that it is part
of mtd-utils and the mtd-utils version from the build system in a
fashion similar to common program packages like the GNU coreutils.
When a program responds to -V/--version or -h/--help, make sure it
reports success exit status.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
- time() was used without prototype.
- the return value of read() and write() wasn't checked
- classificator in printf() was wrong for argument of size_t type
Don't continue to read the /proc/profile in case when write was failed.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|