use an unsigned int for kernel release number
PATCH 1/1 use an unsigned int for kernel release number
Hi,
This fixes kernel_release_satisfactory().
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.
Signature · 1 line
Regards Michael Buesch [ http://www.tuxsoft.de.vu ]
===== udev_utils.c 1.25 vs edited =====
udev_utils.c +4 -4
@@ -62,11 +62,11 @@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;
===== udev_utils.h 1.20 vs edited =====
udev_utils.h +1 -1
@@ -77,7 +77,7 @@#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);
Kay Sievers
AppliedQuoted 4 lines · Michael Buesch
This fixes
kernel_release_satisfactory().
We are already using %u in thesscanf()format string. The patch replaces the int for the kernel release number with unsigned int, as we can never have negative release numbers.
Applied.
Thanks,
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel