Lines Matching defs:ptr
55 void *ptr;
64 ptr = strdup("");
65 CHECK(ptr != NULL);
66 nvlist_move_string(nvl, "nvlist/string/", ptr);
69 CHECK(ptr == nvlist_get_string(nvl, "nvlist/string/"));
72 ptr = strdup("x");
73 CHECK(ptr != NULL);
74 nvlist_move_string(nvl, "nvlist/string/x", ptr);
77 CHECK(ptr == nvlist_get_string(nvl, "nvlist/string/x"));
81 ptr = strdup("abcdefghijklmnopqrstuvwxyz");
82 CHECK(ptr != NULL);
84 ptr);
88 CHECK(ptr ==
102 ptr = malloc(1);
103 CHECK(ptr != NULL);
104 memcpy(ptr, "x", 1);
105 nvlist_move_binary(nvl, "nvlist/binary/x", ptr, 1);
108 CHECK(ptr == nvlist_get_binary(nvl, "nvlist/binary/x", NULL));
109 CHECK(ptr == nvlist_get_binary(nvl, "nvlist/binary/x", &size));
114 ptr = malloc(sizeof("abcdefghijklmnopqrstuvwxyz"));
115 CHECK(ptr != NULL);
116 memcpy(ptr, "abcdefghijklmnopqrstuvwxyz",
119 ptr, sizeof("abcdefghijklmnopqrstuvwxyz"));
123 CHECK(ptr == nvlist_get_binary(nvl,
125 CHECK(ptr == nvlist_get_binary(nvl,
130 ptr = nvlist_clone(nvl);
131 CHECK(ptr != NULL);
132 nvlist_move_nvlist(nvl, "nvlist/nvlist", ptr);
135 CHECK(ptr == nvlist_get_nvlist(nvl, "nvlist/nvlist"));