rec_get.c (14273) | rec_get.c (39327) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 118 unchanged lines hidden (view full) --- 127 recno_t nrec; 128 size_t len; 129 int ch; 130 u_char *p; 131 132 if (t->bt_rdata.size < t->bt_reclen) { 133 t->bt_rdata.data = t->bt_rdata.data == NULL ? 134 malloc(t->bt_reclen) : | 1/*- 2 * Copyright (c) 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 118 unchanged lines hidden (view full) --- 127 recno_t nrec; 128 size_t len; 129 int ch; 130 u_char *p; 131 132 if (t->bt_rdata.size < t->bt_reclen) { 133 t->bt_rdata.data = t->bt_rdata.data == NULL ? 134 malloc(t->bt_reclen) : |
135 realloc(t->bt_rdata.data, t->bt_reclen); | 135 reallocf(t->bt_rdata.data, t->bt_reclen); |
136 if (t->bt_rdata.data == NULL) 137 return (RET_ERROR); 138 t->bt_rdata.size = t->bt_reclen; 139 } 140 data.data = t->bt_rdata.data; 141 data.size = t->bt_reclen; 142 143 for (nrec = t->bt_nrecs; nrec < top;) { --- 56 unchanged lines hidden (view full) --- 200 return (RET_ERROR); 201 break; 202 } 203 if (sz == 0) { 204 len = p - (u_char *)t->bt_rdata.data; 205 t->bt_rdata.size += (sz = 256); 206 t->bt_rdata.data = t->bt_rdata.data == NULL ? 207 malloc(t->bt_rdata.size) : | 136 if (t->bt_rdata.data == NULL) 137 return (RET_ERROR); 138 t->bt_rdata.size = t->bt_reclen; 139 } 140 data.data = t->bt_rdata.data; 141 data.size = t->bt_reclen; 142 143 for (nrec = t->bt_nrecs; nrec < top;) { --- 56 unchanged lines hidden (view full) --- 200 return (RET_ERROR); 201 break; 202 } 203 if (sz == 0) { 204 len = p - (u_char *)t->bt_rdata.data; 205 t->bt_rdata.size += (sz = 256); 206 t->bt_rdata.data = t->bt_rdata.data == NULL ? 207 malloc(t->bt_rdata.size) : |
208 realloc(t->bt_rdata.data, t->bt_rdata.size); | 208 reallocf(t->bt_rdata.data, t->bt_rdata.size); |
209 if (t->bt_rdata.data == NULL) 210 return (RET_ERROR); 211 p = (u_char *)t->bt_rdata.data + len; 212 } 213 } 214 if (ch == EOF) 215 break; 216 } --- 22 unchanged lines hidden (view full) --- 239 DBT data; 240 recno_t nrec; 241 u_char *sp, *ep, *p; 242 size_t len; 243 244 if (t->bt_rdata.size < t->bt_reclen) { 245 t->bt_rdata.data = t->bt_rdata.data == NULL ? 246 malloc(t->bt_reclen) : | 209 if (t->bt_rdata.data == NULL) 210 return (RET_ERROR); 211 p = (u_char *)t->bt_rdata.data + len; 212 } 213 } 214 if (ch == EOF) 215 break; 216 } --- 22 unchanged lines hidden (view full) --- 239 DBT data; 240 recno_t nrec; 241 u_char *sp, *ep, *p; 242 size_t len; 243 244 if (t->bt_rdata.size < t->bt_reclen) { 245 t->bt_rdata.data = t->bt_rdata.data == NULL ? 246 malloc(t->bt_reclen) : |
247 realloc(t->bt_rdata.data, t->bt_reclen); | 247 reallocf(t->bt_rdata.data, t->bt_reclen); |
248 if (t->bt_rdata.data == NULL) 249 return (RET_ERROR); 250 t->bt_rdata.size = t->bt_reclen; 251 } 252 data.data = t->bt_rdata.data; 253 data.size = t->bt_reclen; 254 255 sp = (u_char *)t->bt_cmap; --- 56 unchanged lines hidden --- | 248 if (t->bt_rdata.data == NULL) 249 return (RET_ERROR); 250 t->bt_rdata.size = t->bt_reclen; 251 } 252 data.data = t->bt_rdata.data; 253 data.size = t->bt_reclen; 254 255 sp = (u_char *)t->bt_cmap; --- 56 unchanged lines hidden --- |