Skip to content

Commit

Permalink
wrong function order
Browse files Browse the repository at this point in the history
  • Loading branch information
hhromic committed Aug 27, 2016
1 parent c200cf7 commit 07ca6a8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/e131.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ int e131_pkt_dump(const e131_packet_t *packet) {
return 0;
}

/* Return a string describing an E1.31 destination */
const char *e131_strdest(const e131_addr_t *dest) {
char *strdest = (char *)malloc(sizeof(char) * 22);
sprintf(strdest, "%s:%d", inet_ntoa(dest->sin_addr), ntohs(dest->sin_port));
return strdest;
}

/* Return a string describing an E1.31 error */
const char *e131_strerror(const e131_error_t error) {
switch (error) {
Expand Down Expand Up @@ -285,10 +292,3 @@ const char *e131_strerror(const e131_error_t error) {
return "Unknown error";
}
}

/* Return a string describing an E1.31 destination */
const char *e131_strdest(const e131_addr_t *dest) {
char *strdest = (char *)malloc(sizeof(char) * 22);
sprintf(strdest, "%s:%d", inet_ntoa(dest->sin_addr), ntohs(dest->sin_port));
return strdest;
}

0 comments on commit 07ca6a8

Please sign in to comment.