Browse Source

more bug fixes

master
Felix von Leitner 19 years ago
parent
commit
3dc718a1a5
5 changed files with 1 additions and 6 deletions
  1. +1
    -2
      socket/socket_sendfile.c
  2. +0
    -1
      uint/uint16_pack.c
  3. +0
    -1
      uint/uint16_pack_big.c
  4. +0
    -1
      uint/uint32_pack.c
  5. +0
    -1
      uint/uint32_pack_big.c

+ 1
- 2
socket/socket_sendfile.c View File

@ -35,13 +35,12 @@ int socket_sendfile(int out,int in,uint32 offset,uint32 bytes) {
int socket_sendfile(int out,int in,uint32 offset,uint32 bytes) {
char buf[BUFSIZE];
uint32 n,m;
int n,m;
uint32 sent=0;
if (lseek(in,offset,SEEK_SET) != offset)
return -1;
while (bytes>0) {
char* tmp=buf;
uint32 tobedone;
if ((n=read(in,tmp,(bytes<BUFSIZE)?bytes:BUFSIZE))<=0)
return (sent?sent:-1);
while (n>0) {


+ 0
- 1
uint/uint16_pack.c View File

@ -1,6 +1,5 @@
#define NO_UINT16_MACROS
#include "uint16.h"
#include <endian.h>
void uint16_pack(char *out,uint16 in) {
out[0]=in&255;


+ 0
- 1
uint/uint16_pack_big.c View File

@ -1,6 +1,5 @@
#define NO_UINT16_MACROS
#include "uint16.h"
#include <endian.h>
void uint16_pack_big(char *out,uint16 in) {
out[0]=in>>8;


+ 0
- 1
uint/uint32_pack.c View File

@ -1,6 +1,5 @@
#define NO_UINT32_MACROS
#include "uint32.h"
#include <endian.h>
void uint32_pack(char *out,uint32 in) {
*out=in&0xff; in>>=8;


+ 0
- 1
uint/uint32_pack_big.c View File

@ -1,6 +1,5 @@
#define NO_UINT32_MACROS
#include "uint32.h"
#include <endian.h>
void uint32_pack_big(char *out,uint32 in) {
out[3]=in&0xff; in>>=8;


Loading…
Cancel
Save