Print this page
*** NO COMMENTS ***

@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  */
 
 #ifndef __UTIL_H
 #define __UTIL_H
 

@@ -30,33 +31,22 @@
 extern "C" {
 #endif
 
 #define EOS '\0'
 
-#ifndef NULL 
-#       define NULL ((char *) 0)
-#endif
+#define MALLOC(object_type) ((object_type *)malloc(sizeof (object_type)))
 
+#define FREE(ptr)       free((char *)ptr)
 
-#define MALLOC(object_type) ((object_type *) malloc(sizeof(object_type)))
+#define STRCPY(dst, src) \
+        (dst = malloc((unsigned)strlen(src)+1), (void)strcpy(dst, src))
 
-#define FREE(ptr)       free((char *) ptr) 
+#define STRNCPY(dst, src, num) \
+        (dst = (char *)malloc((unsigned)(num) + 1),\
+        (void) strncpy(dst, src, num), (dst)[num] = EOS)
 
-#define STRCPY(dst,src) \
-        (dst = malloc((unsigned)strlen(src)+1), (void) strcpy(dst,src))
-
-#define STRNCPY(dst,src,num) \
-        (dst = (char *) malloc((unsigned)(num) + 1),\
-        (void)strncpy(dst,src,num),(dst)[num] = EOS) 
-
-/*
-extern char *malloc();
-*/
-extern char *alloca();
-
 char *getaline();
-void fatal();
 
 #ifdef  __cplusplus
 }
 #endif