some coverity fixes.
[minix.git] / lib / libc / sys-minix / loadname.c
blob0b19867761ff109d2067e76749a2f141c83d1423
1 #include <sys/cdefs.h>
2 #include <lib.h>
3 #include "namespace.h"
5 #include <string.h>
7 void _loadname(const char *name, message *msgptr)
9 /* This function is used to load a string into a type m3 message. If the
10 * string fits in the message, it is copied there. If not, a pointer to
11 * it is passed.
14 register size_t k;
16 k = strlen(name) + 1;
17 msgptr->m3_i1 = k;
18 msgptr->m3_p1 = (char *) __UNCONST(name);
19 if (k <= M3_STRING) strcpy(msgptr->m3_ca1, name);