diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-03-07 04:29:43 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:51:00 -0700 |
commit | 63f61c5cf639953aa38e025485919b0aa1c49b59 (patch) | |
tree | 2392041b5aef6984384cf044371ec2d9716014d4 /udev_utils.h | |
parent | 56a8a624eef99f5324b54fad466b144aa4f882c2 (diff) |
[PATCH] replace strncpy()/strncat() by strlcpy()/strlcat()
Diffstat (limited to 'udev_utils.h')
-rw-r--r-- | udev_utils.h | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/udev_utils.h b/udev_utils.h index 3bb1b25362..c7a41aaa44 100644 --- a/udev_utils.h +++ b/udev_utils.h @@ -24,43 +24,9 @@ #include "udev.h" -#define strfieldcpy(to, from) \ -do { \ - to[sizeof(to)-1] = '\0'; \ - strncpy(to, from, sizeof(to)-1); \ -} while (0) - -#define strfieldcat(to, from) \ -do { \ - to[sizeof(to)-1] = '\0'; \ - strncat(to, from, sizeof(to) - strlen(to)-1); \ -} while (0) - -#define strfieldcpymax(to, from, maxsize) \ -do { \ - to[maxsize-1] = '\0'; \ - strncpy(to, from, maxsize-1); \ -} while (0) - -#define strfieldcatmax(to, from, maxsize) \ -do { \ - to[maxsize-1] = '\0'; \ - strncat(to, from, maxsize - strlen(to)-1); \ -} while (0) - -#ifdef asmlinkage -# undef asmlinkage -#endif -#ifdef __i386__ -# define asmlinkage __attribute__((regparm(0))) -#endif -#ifndef asmlinkage -# define asmlinkage -#endif - struct name_entry { struct list_head node; - char name[NAME_SIZE]; + char name[PATH_SIZE]; }; extern int udev_init_device(struct udevice *udev, const char* devpath, const char *subsystem); |