mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
[PATCH] trivial: fix signedness
We are already using %u in the sscanf() format string. The patch replaces the int for the kernel release number with unsigned int, as we can never have negative release numbers.
This commit is contained in:
parent
36429eef37
commit
85925517e6
@ -62,11 +62,11 @@ void udev_init_device(struct udevice *udev, const char* devpath, const char *sub
|
||||
strcpy(udev->group, "root");
|
||||
}
|
||||
|
||||
int kernel_release_satisfactory(int version, int patchlevel, int sublevel)
|
||||
int kernel_release_satisfactory(unsigned int version, unsigned int patchlevel, unsigned int sublevel)
|
||||
{
|
||||
static int kversion = 0;
|
||||
static int kpatchlevel;
|
||||
static int ksublevel;
|
||||
static unsigned int kversion = 0;
|
||||
static unsigned int kpatchlevel;
|
||||
static unsigned int ksublevel;
|
||||
|
||||
if (kversion == 0) {
|
||||
struct utsname uts;
|
||||
|
@ -77,7 +77,7 @@ do { \
|
||||
#endif
|
||||
|
||||
extern void udev_init_device(struct udevice *udev, const char* devpath, const char *subsystem);
|
||||
extern int kernel_release_satisfactory(int version, int patchlevel, int sublevel);
|
||||
extern int kernel_release_satisfactory(unsigned int version, unsigned int patchlevel, unsigned int sublevel);
|
||||
extern int create_path(const char *path);
|
||||
extern int parse_get_pair(char **orig_string, char **left, char **right);
|
||||
extern int file_map(const char *filename, char **buf, size_t *bufsize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user