Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mocklibc: move the print_indent function to the file where it is used #428

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/mocklibc/src/netgroup-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
#include <stdio.h>
#include <stdlib.h>

/**
* Print a varaible indentation to the stream.
* @param stream Stream to print to
* @param indent Number of indents to use
*/
static void print_indent(FILE *stream, unsigned int indent) {
int i;
for (i = 0; i < indent; i++)
fprintf(stream, " ");
}

void netgroup_debug_print_entry(struct entry *entry, FILE *stream, unsigned int indent) {
print_indent(stream, indent);

Expand Down
11 changes: 0 additions & 11 deletions test/mocklibc/src/netgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,6 @@ static char *parser_copy_word(char **cur) {
return result;
}

/**
* Print a varaible indentation to the stream.
* @param stream Stream to print to
* @param indent Number of indents to use
*/
void print_indent(FILE *stream, unsigned int indent) {
int i;
for (i = 0; i < indent; i++)
fprintf(stream, " ");
}

/**
* Connect entries with 'child' type to their child entries.
* @param headentry Head of list of entries that need to be connected
Expand Down