summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-22 02:54:21 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-22 02:54:21 +0000
commit3f3f47b0bd8d089120d267cfad1976db95cd8ebe (patch)
tree145ed3a2c31999fa352c123b3a366a96ce4dde62 /source3/lib
parentbce4d95ca9f0f1b175f5eff682c961754d494253 (diff)
downloadsamba-3f3f47b0bd8d089120d267cfad1976db95cd8ebe.tar.gz
samba-3f3f47b0bd8d089120d267cfad1976db95cd8ebe.tar.bz2
samba-3f3f47b0bd8d089120d267cfad1976db95cd8ebe.zip
added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberally
in the rpc code. (This used to be commit e6ce1c5b5a9f29d8fcbbd23019186ff5c600e795)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 9543388b45..28c7182250 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -379,10 +379,7 @@ char *StrCpy(char *dest,char *src)
char *d = dest;
/* I don't want to get lazy with these ... */
- if (!dest || !src) {
- DEBUG(0,("ERROR: NULL StrCpy() called!\n"));
- smb_panic("invalid StrCpy");
- }
+ ASSERT(dest && src);
if (!dest) return(NULL);
if (!src) {
@@ -4326,8 +4323,9 @@ void smb_panic(char *why)
char *cmd = lp_panic_action();
if (cmd && *cmd) {
system(cmd);
- exit(1);
}
+ DEBUG(0,("PANIC: %s\n", why));
+ exit(1);
}