summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-08 22:47:41 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-08 22:47:41 -0700
commit9450bb648ef98efd6f08ea7d14ab8b9ea6e7bb54 (patch)
tree3737055b1a96e5735ee34cbaa19361217b4eb163
parent84153eee4db318cd897c464e70cb9f8bc8e469f6 (diff)
Make write_string call write_counted_string instead of copying it
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/authutil.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/authutil.c b/src/authutil.c
index 4a4af12..04c0791 100644
--- a/src/authutil.c
+++ b/src/authutil.c
@@ -469,13 +469,7 @@ write_string (FILE *file, const char *string)
if (count > USHRT_MAX)
return (0);
- if (!write_short (file, (unsigned short) count))
- return (0);
-
- if (fwrite (string, sizeof (char), count, file) != count)
- return (0);
-
- return (1);
+ return write_counted_string (file, (unsigned short) count, string);
}