Changeset 1841 for trunk/psLib/src/collections/psHash.c
- Timestamp:
- Sep 21, 2004, 1:15:04 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psHash.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psHash.c
r1747 r1841 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-09- 09 02:23:27$13 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-09-21 23:15:04 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 24 24 #include "psString.h" 25 25 #include "psTrace.h" 26 #include "psError.h" 26 27 #include "psAbort.h" 28 29 #include "psCollectionsErrors.h" 27 30 28 31 static psHashBucket* hashBucketAlloc(const char *key, void *data, psHashBucket* next); … … 83 86 static psHashBucket* hashBucketAlloc(const char *key, void *data, psHashBucket* next) 84 87 { 85 if (key == NULL) {86 psAbort(__func__, "psHashBucket() called with NULL key.");87 }88 88 // Allocate memory for the new hash bucket. 89 89 psHashBucket* bucket = psAlloc(sizeof(psHashBucket)); … … 226 226 // the way this procedure is called. 227 227 if ((table == NULL) || (key == NULL)) { 228 229 psAbort(__func__, "psHashRemove() called with NULL key or table."); 228 psErrorMsg(PS_ERRORNAME_DOMAIN "doHashWork", 229 PS_ERR_BAD_PARAMETER_NULL, true, 230 PS_ERRORTEXT_psHash_KEY_NULL); 231 return NULL; 230 232 } 231 233 // NOTE: This is the originally supplied hash function. … … 341 343 { 342 344 if (table == NULL) { 343 psAbort(__func__, "psHashInsert() called with NULL hash table."); 345 psErrorMsg(PS_ERRORNAME_DOMAIN "psHashAdd", 346 PS_ERR_BAD_PARAMETER_NULL, true, 347 PS_ERRORTEXT_psHash_KEY_NULL); 348 return false; 344 349 } 345 350 if (key == NULL) { 346 psAbort(__func__, "psHashInsert() called with NULL key."); 351 psErrorMsg(PS_ERRORNAME_DOMAIN "psHashAdd", 352 PS_ERR_BAD_PARAMETER_NULL, true, 353 PS_ERRORTEXT_psHash_TABLE_NULL); 354 return false; 347 355 } 348 356 if (data == NULL) { 349 psAbort(__func__, "psHashLookup() called with NULL data."); 357 psErrorMsg(PS_ERRORNAME_DOMAIN "psHashAdd", 358 PS_ERR_BAD_PARAMETER_NULL, true, 359 PS_ERRORTEXT_psHash_DATA_NULL); 350 360 } 351 361 … … 368 378 { 369 379 if (table == NULL) { 370 psAbort(__func__, "psHashLookup() called with NULL hash table."); 380 psErrorMsg(PS_ERRORNAME_DOMAIN "psHashLookup", 381 PS_ERR_BAD_PARAMETER_NULL, true, 382 PS_ERRORTEXT_psHash_KEY_NULL); 383 return NULL; 371 384 } 372 385 if (key == NULL) { 373 psAbort(__func__, "psHashLookup() called with NULL key."); 386 psErrorMsg(PS_ERRORNAME_DOMAIN "psHashLookup", 387 PS_ERR_BAD_PARAMETER_NULL, true, 388 PS_ERRORTEXT_psHash_TABLE_NULL); 389 return NULL; 374 390 } 375 391 … … 393 409 394 410 if (table == NULL) { 395 psAbort(__func__, "psHashRemove() called with NULL hash table."); 411 psErrorMsg(PS_ERRORNAME_DOMAIN "psHashRemove", 412 PS_ERR_BAD_PARAMETER_NULL, true, 413 PS_ERRORTEXT_psHash_TABLE_NULL); 414 return false; 396 415 } 397 416 if (key == NULL) { 398 psAbort(__func__, "psHashRemove() called with NULL key."); 417 psErrorMsg(PS_ERRORNAME_DOMAIN "psHashRemove", 418 PS_ERR_BAD_PARAMETER_NULL, true, 419 PS_ERRORTEXT_psHash_KEY_NULL); 420 return false; 399 421 } 400 422
Note:
See TracChangeset
for help on using the changeset viewer.
