Lines Matching refs:copy
414 * Make a copy of message. Sets "copy" to NULL if fails.
416 #define NG_COPYMESSAGE(copy, msg, how) \
418 (copy) = malloc(sizeof(struct ng_mesg) \
420 if ((copy) == NULL) \
422 (copy)->header.version = NG_VERSION; \
423 (copy)->header.arglen = (msg)->header.arglen; \
424 (copy)->header.token = (msg)->header.token; \
425 (copy)->header.typecookie = (msg)->header.typecookie; \
426 (copy)->header.cmd = (msg)->header.cmd; \
427 (copy)->header.flags = (msg)->header.flags; \
428 bcopy((msg)->header.cmdstr, (copy)->header.cmdstr, \
429 sizeof((copy)->header.cmdstr)); \
431 bcopy((msg)->data, (copy)->data, (msg)->header.arglen); \