DUMB SHIT MISCHIEF AND MALFEASANCE EDITION
105 subscribers
2.58K photos
2.12K videos
16 files
139 links
dumb shit only
Chat: https://t.me/DUUMSHTTERS
Quote wall: https://t.me/sht_tg_says
Download Telegram
Rate my function to read an entire file
int readwholebuffer(char **str, unsigned long int initsize, int fd) {
// Try to read bytes from fd into str
// Bytes read == 0, return 0
// Bytes read < 0, free string, return -1;
// When string hits capacity, double the capacity, and reallocate the string

char *lstr = NULL, *tmp = NULL;
ssize_t bytesread = -1;
int csize = initsize, ccap = initsize;

lstr = xcalloc(initsize, sizeof(char));
while((bytesread = read(fd, lstr + (csize - ccap), ccap)) > 0) {
ccap -= bytesread;
if(ccap <= 0) {
csize *= 2;
ccap = csize / 2;

tmp = realloc(lstr, csize * sizeof(char));
if(!tmp) {
error(0, errno, "Could not reallocate enough space for lstr");
free(lstr);
lstr = NULL; // Need to set this because of the break
bytesread = -100;
break;
}
lstr = tmp;
}
}
if(bytesread < 0 && bytesread != -100) {
error(0, errno, "Ran into a read() error");
free(lstr);
lstr = NULL;
}

if(lstr) {
tmp = realloc(lstr, csize - ccap + 1);
if(!tmp) {
error(0, errno, "Could not shrink lstr after reading buffer");
free(lstr);
bytesread = -100;
}
lstr = tmp;
}

if(lstr) {
lstr[csize - ccap - 1] = '\0'; // Don't include the newline
}

*str = lstr;
return ((bytesread == 0) ? (csize - ccap) : -1);
}
Literally me
๐Ÿคฎ1
Weird interaction on discord today. Some woman was having issues with getting her passport, so I sent her some links. To do this, she had to add me as a friend. She was apprehensive about it, but I reassured her that I wouldn't care if she immediately unfriended me

Then like 30 minutes later she adds me again, says thank you, then starts to chat about random stuff. Mind you, she didn't want to add me or talk just a half hour ago. Eventually, she asks "code switch?", under the reasoning of " I feel like I'm at a disadvantage because you know my first and last name"

I basically replied with "if it makes you feel better, IDC about you. If you left right now I'd just go on with my day". She didn't want to do so unless we were in a VC (?????). I just cut it off because I don't have time for shenanigans like that

The whole thing was just weird. Thanks for coming to my ted talk
๐Ÿ‘€1
Forwarded from Budy Archive (Nero)
Here's to 4 more years of people completely missing the point of the Founding Fathers.

Luckily, their arcane knowledge was passed down through the generations and the Budy Archive was established to carry on with their legacy.
Forwarded from ๐ŸคกCongregation of Clussy๐Ÿคก (๐Ÿ‡ฉ๐Ÿ‡ด A 2007 Toyota Land Cruiser Prado)
This media is not supported in your browser
VIEW IN TELEGRAM
Wake up, Qtard. Your time is now
Forwarded from ๐ŸคกCongregation of Clussy๐Ÿคก (๐Ÿ‡ฉ๐Ÿ‡ด A 2007 Toyota Land Cruiser Prado)
Forwarded from ๐ŸคกCongregation of Clussy๐Ÿคก (๐Ÿ‡ฉ๐Ÿ‡ด A 2007 Toyota Land Cruiser Prado)
Sorry for forwarding, I'll make sure to download them and repost next time
Forwarded from DUMB SHITTERS (Mr. Salmon)
that would be amazing.
If you want the uncucked version of TG, you should probably do it through fdroid
https://f-droid.org/packages/org.telegram.messenger/
๐Ÿซก1
Forwarded from vx-underground
Ross Ulbricht, the creator of the infamous Silk Road, has been pardoned by Donald Trump.
DUMB SHIT MISCHIEF AND MALFEASANCE EDITION pinned ยซRoss Ulbricht, the creator of the infamous Silk Road, has been pardoned by Donald Trump.ยป