Simplify ns_realloc()

No need to conditionally call Tcl_Realloc() vs. Tcl_Alloc() if ptr is
NULL as of 2006 or so.

Signed-off-by: Ayan George <ayan@ayan.net>
Remove NULL pointer check in ns_free()

Removed the NULL pointer check in ns_free() since Tcl_Free() handles
NULL gracefully.

Signed-off-by: Ayan George <ayan@ayan.net>
Fixe bug in ns_strdup(s) when s is NULL.

Signed-off-by: Ayan George <ayan@ayan.net>
Remove NULL check in ns_strcopy() since ns_strdup() handles it.

Signed-off-by: Ayan George <ayan@ayan.net>
Refactor ns_calloc()

Declare and initialize new and size in same statement, change name of
variable from new to rc.

Signed-off-by: Ayan George <ayan@ayan.net>
Minor indentation changes.

Signed-off-by: Ayan George <ayan@ayan.net>
Remove unnecessary cast of ns_malloc().

Signed-off-by: Ayan George <ayan@ayan.net>
Declare and initialize newlPtr on the same line.

Signed-off-by: Ayan George <ayan@ayan.net>